All URIs are relative to https://rocc.org/api/v1
Method | HTTP request | Description |
---|---|---|
create_tag | POST /tags | Create a tag |
delete_tag | DELETE /tags/{tagId} | Delete a tag |
get_tag | GET /tags/{tagId} | Get a tag |
list_tags | GET /tags | Get all tags |
TagCreateResponse create_tag(tag_id, tag_create_request=tag_create_request)
Create a tag
Create a tag with the specified name
from __future__ import print_function
import time
import roccclient
from roccclient.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://rocc.org/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = roccclient.Configuration(
host = "https://rocc.org/api/v1"
)
# Enter a context with an instance of the API client
with roccclient.ApiClient() as api_client:
# Create an instance of the API class
api_instance = roccclient.TagApi(api_client)
tag_id = 'tag_id_example' # str | The ID of the tag that is being created
tag_create_request = roccclient.TagCreateRequest() # TagCreateRequest | (optional)
try:
# Create a tag
api_response = api_instance.create_tag(tag_id, tag_create_request=tag_create_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling TagApi->create_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tag_id | str | The ID of the tag that is being created | |
tag_create_request | TagCreateRequest | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Success | - |
400 | Invalid request | - |
409 | The request conflicts with current state of the target resource | - |
500 | The request cannot be fulfilled due to an unexpected server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object delete_tag(tag_id)
Delete a tag
Deletes the tag specified
from __future__ import print_function
import time
import roccclient
from roccclient.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://rocc.org/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = roccclient.Configuration(
host = "https://rocc.org/api/v1"
)
# Enter a context with an instance of the API client
with roccclient.ApiClient() as api_client:
# Create an instance of the API class
api_instance = roccclient.TagApi(api_client)
tag_id = 'tag_id_example' # str | The ID of the tag
try:
# Delete a tag
api_response = api_instance.delete_tag(tag_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TagApi->delete_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tag_id | str | The ID of the tag |
object
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
404 | The specified resource was not found | - |
500 | The request cannot be fulfilled due to an unexpected server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tag get_tag(tag_id)
Get a tag
Returns the tag specified
from __future__ import print_function
import time
import roccclient
from roccclient.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://rocc.org/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = roccclient.Configuration(
host = "https://rocc.org/api/v1"
)
# Enter a context with an instance of the API client
with roccclient.ApiClient() as api_client:
# Create an instance of the API class
api_instance = roccclient.TagApi(api_client)
tag_id = 'tag_id_example' # str | The ID of the tag
try:
# Get a tag
api_response = api_instance.get_tag(tag_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TagApi->get_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tag_id | str | The ID of the tag |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
404 | The specified resource was not found | - |
500 | The request cannot be fulfilled due to an unexpected server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PageOfTags list_tags(limit=limit, offset=offset, filter=filter)
Get all tags
Returns the tags
from __future__ import print_function
import time
import roccclient
from roccclient.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://rocc.org/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = roccclient.Configuration(
host = "https://rocc.org/api/v1"
)
# Enter a context with an instance of the API client
with roccclient.ApiClient() as api_client:
# Create an instance of the API class
api_instance = roccclient.TagApi(api_client)
limit = 10 # int | Maximum number of results returned (optional) (default to 10)
offset = 0 # int | Index of the first result that must be returned (optional) (default to 0)
filter = roccclient.TagFilter() # TagFilter | Object that describes how to filter the results (optional)
try:
# Get all tags
api_response = api_instance.list_tags(limit=limit, offset=offset, filter=filter)
pprint(api_response)
except ApiException as e:
print("Exception when calling TagApi->list_tags: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
limit | int | Maximum number of results returned | [optional] [default to 10] |
offset | int | Index of the first result that must be returned | [optional] [default to 0] |
filter | TagFilter | Object that describes how to filter the results | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Invalid request | - |
500 | The request cannot be fulfilled due to an unexpected server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]