Skip to content

Latest commit

 

History

History
285 lines (204 loc) · 8.42 KB

File metadata and controls

285 lines (204 loc) · 8.42 KB

liveagent_api.TagsApi

All URIs are relative to http://localhost/api/v3

Method HTTP request Description
create_tag POST /tags Create tag
delete_tag DELETE /tags/{tagId} Delete tag
get_tag_by_id GET /tags/{tagId} Get tag by tag id
get_tags_list GET /tags Gets list of tags
update_tag PUT /tags/{tagId} Update tag

create_tag

Tag create_tag(tag=tag)

Create tag

Create new tag

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.TagsApi()
tag = liveagent_api.Tag() # Tag |  (optional)

try: 
    # Create tag
    api_response = api_instance.create_tag(tag=tag)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TagsApi->create_tag: %s\n" % e

Parameters

Name Type Description Notes
tag Tag [optional]

Return type

Tag

Authorization

privileges, apikey

HTTP request headers

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

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

delete_tag

OkResponse delete_tag(tag_id)

Delete tag

Deletes a tag

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.TagsApi()
tag_id = 'tag_id_example' # str | 

try: 
    # Delete tag
    api_response = api_instance.delete_tag(tag_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TagsApi->delete_tag: %s\n" % e

Parameters

Name Type Description Notes
tag_id str

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

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

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

get_tag_by_id

list[Tag] get_tag_by_id(tag_id)

Get tag by tag id

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.TagsApi()
tag_id = 'tag_id_example' # str | 

try: 
    # Get tag by tag id
    api_response = api_instance.get_tag_by_id(tag_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TagsApi->get_tag_by_id: %s\n" % e

Parameters

Name Type Description Notes
tag_id str

Return type

list[Tag]

Authorization

privileges, apikey

HTTP request headers

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

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

get_tags_list

list[Tag] get_tags_list(page=page, per_page=per_page, _from=_from, to=to)

Gets list of tags

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.TagsApi()
page = 1 # int | Page to display. Not used if _from is defined. (optional) (default to 1)
per_page = 10 # int | Results per page. Used only if _page is used. (optional) (default to 10)
_from = 0 # int | Result set start. Takes precedence over _page. (optional) (default to 0)
to = 0 # int | Result set end. Used only if _from is used. (optional) (default to 0)

try: 
    # Gets list of tags
    api_response = api_instance.get_tags_list(page=page, per_page=per_page, _from=_from, to=to)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TagsApi->get_tags_list: %s\n" % e

Parameters

Name Type Description Notes
page int Page to display. Not used if _from is defined. [optional] [default to 1]
per_page int Results per page. Used only if _page is used. [optional] [default to 10]
_from int Result set start. Takes precedence over _page. [optional] [default to 0]
to int Result set end. Used only if _from is used. [optional] [default to 0]

Return type

list[Tag]

Authorization

privileges, apikey

HTTP request headers

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

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

update_tag

list[Tag] update_tag(tag_id, tag=tag)

Update tag

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.TagsApi()
tag_id = 'tag_id_example' # str | 
tag = liveagent_api.Tag() # Tag |  (optional)

try: 
    # Update tag
    api_response = api_instance.update_tag(tag_id, tag=tag)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TagsApi->update_tag: %s\n" % e

Parameters

Name Type Description Notes
tag_id str
tag Tag [optional]

Return type

list[Tag]

Authorization

privileges, apikey

HTTP request headers

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

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