Skip to content

Latest commit

 

History

History
263 lines (179 loc) · 7.75 KB

TagsApi.md

File metadata and controls

263 lines (179 loc) · 7.75 KB

eliona.api_client2.TagsApi

All URIs are relative to https://name.eliona.io/v2

Method HTTP request Description
get_tag_by_name GET /tags/{tag-name} Information about a tag
get_tags GET /tags Information about tags
put_tag PUT /tags Create or update a tag

get_tag_by_name

Tag get_tag_by_name(tag_name)

Information about a tag

Gets information about a tag.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import eliona.api_client2
from eliona.api_client2.models.tag import Tag
from eliona.api_client2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://name.eliona.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = eliona.api_client2.Configuration(
    host = "https://name.eliona.io/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = eliona.api_client2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with eliona.api_client2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = eliona.api_client2.TagsApi(api_client)
    tag_name = 'Support' # str | The name of the tag

    try:
        # Information about a tag
        api_response = api_instance.get_tag_by_name(tag_name)
        print("The response of TagsApi->get_tag_by_name:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TagsApi->get_tag_by_name: %s\n" % e)

Parameters

Name Type Description Notes
tag_name str The name of the tag

Return type

Tag

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully returned the tag by name. -
404 Tag with name not found -

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

get_tags

List[Tag] get_tags()

Information about tags

Gets a list of tags

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import eliona.api_client2
from eliona.api_client2.models.tag import Tag
from eliona.api_client2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://name.eliona.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = eliona.api_client2.Configuration(
    host = "https://name.eliona.io/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = eliona.api_client2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with eliona.api_client2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = eliona.api_client2.TagsApi(api_client)

    try:
        # Information about tags
        api_response = api_instance.get_tags()
        print("The response of TagsApi->get_tags:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TagsApi->get_tags: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[Tag]

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully returned the list of tags -

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

put_tag

Tag put_tag(tag)

Create or update a tag

Creates a tag if no tag exists or update it if already exists. Uses name for updating.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import eliona.api_client2
from eliona.api_client2.models.tag import Tag
from eliona.api_client2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://name.eliona.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = eliona.api_client2.Configuration(
    host = "https://name.eliona.io/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = eliona.api_client2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with eliona.api_client2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = eliona.api_client2.TagsApi(api_client)
    tag = eliona.api_client2.Tag() # Tag | 

    try:
        # Create or update a tag
        api_response = api_instance.put_tag(tag)
        print("The response of TagsApi->put_tag:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TagsApi->put_tag: %s\n" % e)

Parameters

Name Type Description Notes
tag Tag

Return type

Tag

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully created a new or updated an existing tag -

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