All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| api_tags_get | GET /api/tags | Fetch all existing tags |
| api_tags_id_delete | DELETE /api/tags/{id} | Delete a tag |
| api_tags_post | POST /api/tags | Creates a new tag |
list[str] api_tags_get(name=name)
Fetch all existing tags
from __future__ import print_function
import time
import kimai_python
from kimai_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiToken
configuration = kimai_python.Configuration()
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'
# Configure API key authorization: apiUser
configuration = kimai_python.Configuration()
configuration.api_key['X-AUTH-USER'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-USER'] = 'Bearer'
# create an instance of the API class
api_instance = kimai_python.TagApi(kimai_python.ApiClient(configuration))
name = 'name_example' # str | Search term to filter tag list (optional)
try:
# Fetch all existing tags
api_response = api_instance.api_tags_get(name=name)
pprint(api_response)
except ApiException as e:
print("Exception when calling TagApi->api_tags_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Search term to filter tag list | [optional] |
list[str]
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
api_tags_id_delete(id)
Delete a tag
from __future__ import print_function
import time
import kimai_python
from kimai_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiToken
configuration = kimai_python.Configuration()
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'
# Configure API key authorization: apiUser
configuration = kimai_python.Configuration()
configuration.api_key['X-AUTH-USER'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-USER'] = 'Bearer'
# create an instance of the API class
api_instance = kimai_python.TagApi(kimai_python.ApiClient(configuration))
id = 56 # int | Tag ID to delete
try:
# Delete a tag
api_instance.api_tags_id_delete(id)
except ApiException as e:
print("Exception when calling TagApi->api_tags_id_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Tag ID to delete |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TagEntity api_tags_post(body)
Creates a new tag
Creates a new tag and returns it afterwards
from __future__ import print_function
import time
import kimai_python
from kimai_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiToken
configuration = kimai_python.Configuration()
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'
# Configure API key authorization: apiUser
configuration = kimai_python.Configuration()
configuration.api_key['X-AUTH-USER'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-USER'] = 'Bearer'
# create an instance of the API class
api_instance = kimai_python.TagApi(kimai_python.ApiClient(configuration))
body = kimai_python.TagEditForm() # TagEditForm |
try:
# Creates a new tag
api_response = api_instance.api_tags_post(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TagApi->api_tags_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | TagEditForm |
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]