All URIs are relative to http://localhost/api/v2.0
| Method | HTTP request | Description |
|---|---|---|
| CreateLabel | Post /labels | Post creates a label |
| DeleteLabel | Delete /labels/{label_id} | Delete the label specified by ID. |
| GetLabelByID | Get /labels/{label_id} | Get the label specified by ID. |
| ListLabels | Get /labels | List labels according to the query strings. |
| UpdateLabel | Put /labels/{label_id} | Update the label properties. |
CreateLabel(ctx, label, optional) Post creates a label
This endpoint let user creates a label.
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| label | Label | The json object of label. | |
| optional | *LabelApiCreateLabelOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a LabelApiCreateLabelOpts struct
| Name | Type | Description | Notes |
|---|
xRequestId | optional.String| An unique ID for the request |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteLabel(ctx, labelId, optional) Delete the label specified by ID.
Delete the label specified by ID.
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| labelId | int64 | Label ID | |
| optional | *LabelApiDeleteLabelOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a LabelApiDeleteLabelOpts struct
| Name | Type | Description | Notes |
|---|
xRequestId | optional.String| An unique ID for the request |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Label GetLabelByID(ctx, labelId, optional) Get the label specified by ID.
This endpoint let user get the label by specific ID.
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| labelId | int64 | Label ID | |
| optional | *LabelApiGetLabelByIDOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a LabelApiGetLabelByIDOpts struct
| Name | Type | Description | Notes |
|---|
xRequestId | optional.String| An unique ID for the request |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Label ListLabels(ctx, optional) List labels according to the query strings.
This endpoint let user list labels by name, scope and project_id
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| optional | *LabelApiListLabelsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a LabelApiListLabelsOpts struct
| Name | Type | Description | Notes |
|---|---|---|---|
| xRequestId | optional.String | An unique ID for the request | |
| q | optional.String | Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k= |
|
| sort | optional.String | Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with "sort=field1,-field2" | |
| page | optional.Int64 | The page number | [default to 1] |
| pageSize | optional.Int64 | The size of per page | [default to 10] |
| name | optional.String | The label name. | |
| scope | optional.String | The label scope. Valid values are g and p. g for global labels and p for project labels. | |
| projectId | optional.Int64 | Relevant project ID, required when scope is p. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateLabel(ctx, labelId, label, optional) Update the label properties.
This endpoint let user update label properties.
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| labelId | int64 | Label ID | |
| label | Label | The updated label json object. | |
| optional | *LabelApiUpdateLabelOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a LabelApiUpdateLabelOpts struct
| Name | Type | Description | Notes |
|---|
xRequestId | optional.String| An unique ID for the request |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]