Skip to content

Latest commit

 

History

History
454 lines (324 loc) · 14 KB

File metadata and controls

454 lines (324 loc) · 14 KB

liveagent_api.ApiApi

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

Method HTTP request Description
create_api_keys POST /apikeys Creates api key
delete_api_key DELETE /apikeys/{apikeyId} Deletes api key
generate_api_key POST /apikeys/_generate Gets new api keys
get_api_info GET /api/info/{apiVersion} Gets api info
get_api_key GET /apikeys/{apikeyId} Gets api keys
get_api_keys GET /apikeys Gets api keys
get_api_privileges GET /api/privileges Gets api privileges
update_api_key PUT /apikeys/{apikeyId} Updates api key

create_api_keys

ApiKeyWithPrivileges create_api_keys(api_key=api_key)

Creates api key

Create api key

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.ApiApi()
api_key = liveagent_api.ApiKeyWithPrivileges() # ApiKeyWithPrivileges |  (optional)

try: 
    # Creates api key
    api_response = api_instance.create_api_keys(api_key=api_key)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApiApi->create_api_keys: %s\n" % e

Parameters

Name Type Description Notes
api_key ApiKeyWithPrivileges [optional]

Return type

ApiKeyWithPrivileges

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_api_key

OkResponse delete_api_key(apikey_id)

Deletes api key

Delete an api key

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.ApiApi()
apikey_id = 3.4 # float | 

try: 
    # Deletes api key
    api_response = api_instance.delete_api_key(apikey_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApiApi->delete_api_key: %s\n" % e

Parameters

Name Type Description Notes
apikey_id float

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]

generate_api_key

ApiKey generate_api_key()

Gets new api keys

Get new api key

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.ApiApi()

try: 
    # Gets new api keys
    api_response = api_instance.generate_api_key()
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApiApi->generate_api_key: %s\n" % e

Parameters

This endpoint does not need any parameter.

Return type

ApiKey

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_api_info

ApiInfo get_api_info(api_version)

Gets api info

Get information about api

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.ApiApi()
api_version = 'api_version_example' # str | v1 - legacy api version,  v3 - current api version

try: 
    # Gets api info
    api_response = api_instance.get_api_info(api_version)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApiApi->get_api_info: %s\n" % e

Parameters

Name Type Description Notes
api_version str v1 - legacy api version, v3 - current api version

Return type

ApiInfo

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_api_key

ApiKeyWithPrivileges get_api_key(apikey_id)

Gets api keys

Get information about api keys

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.ApiApi()
apikey_id = 3.4 # float | 

try: 
    # Gets api keys
    api_response = api_instance.get_api_key(apikey_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApiApi->get_api_key: %s\n" % e

Parameters

Name Type Description Notes
apikey_id float

Return type

ApiKeyWithPrivileges

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_api_keys

list[ApiKey] get_api_keys(page=page, per_page=per_page, _from=_from, to=to, sort_dir=sort_dir, sort_field=sort_field, filters=filters)

Gets api keys

Get information about api keys

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.ApiApi()
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)
sort_dir = 'ASC' # str | Sorting direction ASC or DESC (optional) (default to ASC)
sort_field = 'sort_field_example' # str | Sorting field (optional)
filters = 'filters_example' # str | Filters (json object {column:value, ...}) (optional)

try: 
    # Gets api keys
    api_response = api_instance.get_api_keys(page=page, per_page=per_page, _from=_from, to=to, sort_dir=sort_dir, sort_field=sort_field, filters=filters)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApiApi->get_api_keys: %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]
sort_dir str Sorting direction ASC or DESC [optional] [default to ASC]
sort_field str Sorting field [optional]
filters str Filters (json object {column:value, ...}) [optional]

Return type

list[ApiKey]

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_api_privileges

list[ApiPrivilege] get_api_privileges()

Gets api privileges

Get api privileges

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.ApiApi()

try: 
    # Gets api privileges
    api_response = api_instance.get_api_privileges()
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApiApi->get_api_privileges: %s\n" % e

Parameters

This endpoint does not need any parameter.

Return type

list[ApiPrivilege]

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_api_key

ApiKeyWithPrivileges update_api_key(apikey_id, api_key=api_key)

Updates api key

Update an api key

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.ApiApi()
apikey_id = 3.4 # float | 
api_key = liveagent_api.ApiKeyWithPrivileges() # ApiKeyWithPrivileges |  (optional)

try: 
    # Updates api key
    api_response = api_instance.update_api_key(apikey_id, api_key=api_key)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApiApi->update_api_key: %s\n" % e

Parameters

Name Type Description Notes
apikey_id float
api_key ApiKeyWithPrivileges [optional]

Return type

ApiKeyWithPrivileges

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]