Skip to content

Latest commit

 

History

History
578 lines (369 loc) · 18 KB

CategoriesApi.md

File metadata and controls

578 lines (369 loc) · 18 KB

\CategoriesApi

All URIs are relative to /api

Method HTTP request Description
V1CategoriesDeleteMultiplePost Post /v1/categories/delete-multiple Delete multiple Categories by their IDs
V1CategoriesGet Get /v1/categories Get Category objects
V1CategoriesIdDelete Delete /v1/categories/{id} Remove specified Category record
V1CategoriesIdGet Get /v1/categories/{id} Get specified Category object
V1CategoriesIdHistoryGet Get /v1/categories/{id}/history Get specified Category history object
V1CategoriesIdHistoryPost Post /v1/categories/{id}/history Add specified Category history object notes
V1CategoriesIdPut Put /v1/categories/{id} Update specified Category object
V1CategoriesPost Post /v1/categories Create Category record

V1CategoriesDeleteMultiplePost

V1CategoriesDeleteMultiplePost(ctx).Ids(ids).Execute()

Delete multiple Categories by their IDs

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    ids := *openapiclient.NewIds() // Ids | IDs of the categories to be deleted

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CategoriesApi.V1CategoriesDeleteMultiplePost(context.Background()).Ids(ids).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CategoriesApi.V1CategoriesDeleteMultiplePost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiV1CategoriesDeleteMultiplePostRequest struct via the builder pattern

Name Type Description Notes
ids Ids IDs of the categories to be deleted

Return type

(empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

V1CategoriesGet

CategoriesSearchResults V1CategoriesGet(ctx).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).Execute()

Get Category objects

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    page := int32(56) // int32 |  (optional) (default to 0)
    pageSize := int32(56) // int32 |  (optional) (default to 100)
    sort := []string{"Inner_example"} // []string | Sorting criteria in the format: property:asc/desc. Default sort is id:asc. Multiple sort criteria are supported and must be separated with a comma. Example: sort=date:desc,name:asc  (optional) (default to ["id:asc"])
    filter := "filter_example" // string | Query in the RSQL format, allowing to filter categories collection. Default filter is empty query - returning all results for the requested page. Fields allowed in the query: name, priority. This param can be combined with paging and sorting. Example: filter=name==\"Apps*\" and priority>=5 (optional) (default to "")

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CategoriesApi.V1CategoriesGet(context.Background()).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CategoriesApi.V1CategoriesGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `V1CategoriesGet`: CategoriesSearchResults
    fmt.Fprintf(os.Stdout, "Response from `CategoriesApi.V1CategoriesGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiV1CategoriesGetRequest struct via the builder pattern

Name Type Description Notes
page int32 [default to 0]
pageSize int32 [default to 100]
sort []string Sorting criteria in the format: property:asc/desc. Default sort is id:asc. Multiple sort criteria are supported and must be separated with a comma. Example: sort=date:desc,name:asc [default to ["id:asc"]]
filter string Query in the RSQL format, allowing to filter categories collection. Default filter is empty query - returning all results for the requested page. Fields allowed in the query: name, priority. This param can be combined with paging and sorting. Example: filter=name=="Apps*" and priority>=5 [default to ""]

Return type

CategoriesSearchResults

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

V1CategoriesIdDelete

V1CategoriesIdDelete(ctx, id).Execute()

Remove specified Category record

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | instance id of category record

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CategoriesApi.V1CategoriesIdDelete(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CategoriesApi.V1CategoriesIdDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string instance id of category record

Other Parameters

Other parameters are passed through a pointer to a apiV1CategoriesIdDeleteRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

V1CategoriesIdGet

Category V1CategoriesIdGet(ctx, id).Execute()

Get specified Category object

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | instance id of category record

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CategoriesApi.V1CategoriesIdGet(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CategoriesApi.V1CategoriesIdGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `V1CategoriesIdGet`: Category
    fmt.Fprintf(os.Stdout, "Response from `CategoriesApi.V1CategoriesIdGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string instance id of category record

Other Parameters

Other parameters are passed through a pointer to a apiV1CategoriesIdGetRequest struct via the builder pattern

Name Type Description Notes

Return type

Category

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

V1CategoriesIdHistoryGet

HistorySearchResults V1CategoriesIdHistoryGet(ctx, id).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).Execute()

Get specified Category history object

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | instance id of category history record
    page := int32(56) // int32 |  (optional) (default to 0)
    pageSize := int32(56) // int32 |  (optional) (default to 100)
    sort := []string{"Inner_example"} // []string | Sorting criteria in the format: property:asc/desc. Default sort is id:asc. Multiple sort criteria are supported and must be separated with a comma. Example: sort=date:desc,name:asc  (optional) (default to ["date:desc"])
    filter := "filter_example" // string | Query in the RSQL format, allowing to filter history notes collection. Default filter is empty query - returning all results for the requested page. Fields allowed in the query: username, date, note, details. This param can be combined with paging and sorting. Example: filter=username!=admin and details==*disabled* and date<2019-12-15 (optional) (default to "")

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CategoriesApi.V1CategoriesIdHistoryGet(context.Background(), id).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CategoriesApi.V1CategoriesIdHistoryGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `V1CategoriesIdHistoryGet`: HistorySearchResults
    fmt.Fprintf(os.Stdout, "Response from `CategoriesApi.V1CategoriesIdHistoryGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string instance id of category history record

Other Parameters

Other parameters are passed through a pointer to a apiV1CategoriesIdHistoryGetRequest struct via the builder pattern

Name Type Description Notes

page | int32 | | [default to 0] pageSize | int32 | | [default to 100] sort | []string | Sorting criteria in the format: property:asc/desc. Default sort is id:asc. Multiple sort criteria are supported and must be separated with a comma. Example: sort=date:desc,name:asc | [default to ["date:desc"]] filter | string | Query in the RSQL format, allowing to filter history notes collection. Default filter is empty query - returning all results for the requested page. Fields allowed in the query: username, date, note, details. This param can be combined with paging and sorting. Example: filter=username!=admin and details==disabled and date<2019-12-15 | [default to ""]

Return type

HistorySearchResults

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

V1CategoriesIdHistoryPost

ObjectHistory V1CategoriesIdHistoryPost(ctx, id).ObjectHistoryNote(objectHistoryNote).Execute()

Add specified Category history object notes

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | instance id of category history record
    objectHistoryNote := *openapiclient.NewObjectHistoryNote("A generic note can sometimes be useful, but generally not.") // ObjectHistoryNote | history notes to create

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CategoriesApi.V1CategoriesIdHistoryPost(context.Background(), id).ObjectHistoryNote(objectHistoryNote).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CategoriesApi.V1CategoriesIdHistoryPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `V1CategoriesIdHistoryPost`: ObjectHistory
    fmt.Fprintf(os.Stdout, "Response from `CategoriesApi.V1CategoriesIdHistoryPost`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string instance id of category history record

Other Parameters

Other parameters are passed through a pointer to a apiV1CategoriesIdHistoryPostRequest struct via the builder pattern

Name Type Description Notes

objectHistoryNote | ObjectHistoryNote | history notes to create |

Return type

ObjectHistory

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

V1CategoriesIdPut

Category V1CategoriesIdPut(ctx, id).Category(category).Execute()

Update specified Category object

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | instance id of category record
    category := *openapiclient.NewCategory("The Best", int32(9)) // Category | category object to create. id defined in this body will be ignored

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CategoriesApi.V1CategoriesIdPut(context.Background(), id).Category(category).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CategoriesApi.V1CategoriesIdPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `V1CategoriesIdPut`: Category
    fmt.Fprintf(os.Stdout, "Response from `CategoriesApi.V1CategoriesIdPut`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string instance id of category record

Other Parameters

Other parameters are passed through a pointer to a apiV1CategoriesIdPutRequest struct via the builder pattern

Name Type Description Notes

category | Category | category object to create. id defined in this body will be ignored |

Return type

Category

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

V1CategoriesPost

HrefResponse V1CategoriesPost(ctx).Category(category).Execute()

Create Category record

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    category := *openapiclient.NewCategory("The Best", int32(9)) // Category | category object to create. IDs defined in this body will be ignored

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CategoriesApi.V1CategoriesPost(context.Background()).Category(category).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CategoriesApi.V1CategoriesPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `V1CategoriesPost`: HrefResponse
    fmt.Fprintf(os.Stdout, "Response from `CategoriesApi.V1CategoriesPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiV1CategoriesPostRequest struct via the builder pattern

Name Type Description Notes
category Category category object to create. IDs defined in this body will be ignored

Return type

HrefResponse

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]