cm_client.TagsResourceApi

All URIs are relative to https://localhost/api/v44

Method HTTP request Description
get_tags GET /tags Current CM entities and their tags.
read_tags_by_name GET /tags/{tagName} Get Entities given the Tag name, grouped by entity type.

get_tags

ApiTagToEntitiesList get_tags(limit=limit, offset=offset)

Current CM entities and their tags.

Current CM entities and their tags. Tag names beginning with the prefix cldr (case insensitive) are reserved for internal use by Cloudera.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.TagsResourceApi(cm_client.ApiClient(configuration))
limit = 10 # int | Number of tags to search for. Maximum value for limit is 1000. (optional) (default to 10)
offset = 0 # int | Starting index of the list (optional) (default to 0)

try:
    # Current CM entities and their tags.
    api_response = api_instance.get_tags(limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TagsResourceApi->get_tags: %s\n" % e)

Parameters

Name Type Description Notes
limit int Number of tags to search for. Maximum value for limit is 1000. [optional] [default to 10]
offset int Starting index of the list [optional] [default to 0]

Return type

ApiTagToEntitiesList

Authorization

basic

HTTP request headers

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

read_tags_by_name

ApiTagToEntitiesList read_tags_by_name(tag_name, limit=limit, offset=offset)

Get Entities given the Tag name, grouped by entity type.

Get Entities given the Tag name, grouped by entity type.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.TagsResourceApi(cm_client.ApiClient(configuration))
tag_name = 'tag_name_example' # str | Name of the tag
limit = 10 # int | Number of entries to search for. Maximum value for limit is 1000. (optional) (default to 10)
offset = 0 # int | Starting index of the list (optional) (default to 0)

try:
    # Get Entities given the Tag name, grouped by entity type.
    api_response = api_instance.read_tags_by_name(tag_name, limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TagsResourceApi->read_tags_by_name: %s\n" % e)

Parameters

Name Type Description Notes
tag_name str Name of the tag
limit int Number of entries to search for. Maximum value for limit is 1000. [optional] [default to 10]
offset int Starting index of the list [optional] [default to 0]

Return type

ApiTagToEntitiesList

Authorization

basic

HTTP request headers

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