All URIs are relative to http://localhost:8000
| Method | HTTP request | Description |
|---|---|---|
| create_tag | POST /v1/tags | Create Tag Handler |
| delete_tag | DELETE /v1/tags/{tag_id} | Delete Tag Handler |
| get_tag | GET /v1/tags/{tag_id} | Get Tag Handler |
| list_tags | GET /v1/tags | List Tags Handler |
| update_tag | PATCH /v1/tags/{tag_id} | Update Tag Handler |
TagResponse create_tag(create_tag_request, authorization=authorization, ks_uat=ks_uat)
Create Tag Handler
Create a new tag for the current tenant. Requires ADMIN or OWNER role.
import ksapi
from ksapi.models.create_tag_request import CreateTagRequest
from ksapi.models.tag_response import TagResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.TagsApi(api_client)
create_tag_request = ksapi.CreateTagRequest() # CreateTagRequest |
authorization = 'authorization_example' # str | (optional)
ks_uat = 'ks_uat_example' # str | (optional)
try:
# Create Tag Handler
api_response = api_instance.create_tag(create_tag_request, authorization=authorization, ks_uat=ks_uat)
print("The response of TagsApi->create_tag:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TagsApi->create_tag: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| create_tag_request | CreateTagRequest | ||
| authorization | str | [optional] | |
| ks_uat | str | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_tag(tag_id, authorization=authorization, ks_uat=ks_uat)
Delete Tag Handler
Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
import ksapi
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.TagsApi(api_client)
tag_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
authorization = 'authorization_example' # str | (optional)
ks_uat = 'ks_uat_example' # str | (optional)
try:
# Delete Tag Handler
api_instance.delete_tag(tag_id, authorization=authorization, ks_uat=ks_uat)
except Exception as e:
print("Exception when calling TagsApi->delete_tag: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| tag_id | UUID | ||
| authorization | str | [optional] | |
| ks_uat | str | [optional] |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TagResponse get_tag(tag_id, authorization=authorization, ks_uat=ks_uat)
Get Tag Handler
Get a tag by its ID.
import ksapi
from ksapi.models.tag_response import TagResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.TagsApi(api_client)
tag_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
authorization = 'authorization_example' # str | (optional)
ks_uat = 'ks_uat_example' # str | (optional)
try:
# Get Tag Handler
api_response = api_instance.get_tag(tag_id, authorization=authorization, ks_uat=ks_uat)
print("The response of TagsApi->get_tag:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TagsApi->get_tag: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| tag_id | UUID | ||
| authorization | str | [optional] | |
| ks_uat | str | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedResponseTagResponse list_tags(limit=limit, offset=offset, authorization=authorization, ks_uat=ks_uat)
List Tags Handler
List all tags for the current tenant.
import ksapi
from ksapi.models.paginated_response_tag_response import PaginatedResponseTagResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.TagsApi(api_client)
limit = 20 # int | Number of items per page (optional) (default to 20)
offset = 0 # int | Number of items to skip (optional) (default to 0)
authorization = 'authorization_example' # str | (optional)
ks_uat = 'ks_uat_example' # str | (optional)
try:
# List Tags Handler
api_response = api_instance.list_tags(limit=limit, offset=offset, authorization=authorization, ks_uat=ks_uat)
print("The response of TagsApi->list_tags:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TagsApi->list_tags: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int | Number of items per page | [optional] [default to 20] |
| offset | int | Number of items to skip | [optional] [default to 0] |
| authorization | str | [optional] | |
| ks_uat | str | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TagResponse update_tag(tag_id, update_tag_request, authorization=authorization, ks_uat=ks_uat)
Update Tag Handler
Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
import ksapi
from ksapi.models.tag_response import TagResponse
from ksapi.models.update_tag_request import UpdateTagRequest
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.TagsApi(api_client)
tag_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
update_tag_request = ksapi.UpdateTagRequest() # UpdateTagRequest |
authorization = 'authorization_example' # str | (optional)
ks_uat = 'ks_uat_example' # str | (optional)
try:
# Update Tag Handler
api_response = api_instance.update_tag(tag_id, update_tag_request, authorization=authorization, ks_uat=ks_uat)
print("The response of TagsApi->update_tag:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TagsApi->update_tag: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| tag_id | UUID | ||
| update_tag_request | UpdateTagRequest | ||
| authorization | str | [optional] | |
| ks_uat | str | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]