All URIs are relative to http://localhost/api/v3
| Method | HTTP request | Description |
|---|---|---|
| get_extension | GET /extensions/{extensionId} | Gets Extension |
| get_extensions_list | GET /extensions | Gets list of extensions |
| set_extension | PUT /extensions/{extensionId} | Set extension |
Extension get_extension(extension_id)
Gets Extension
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.ExtensionsApi()
extension_id = 'extension_id_example' # str |
try:
# Gets Extension
api_response = api_instance.get_extension(extension_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling ExtensionsApi->get_extension: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| extension_id | str |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[Extension] get_extensions_list(page=page, per_page=per_page, _from=_from, to=to, sort_dir=sort_dir, sort_field=sort_field, filters=filters)
Gets list of extensions
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.ExtensionsApi()
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 list of extensions
api_response = api_instance.get_extensions_list(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 ExtensionsApi->get_extensions_list: %s\n" % e| 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] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Extension set_extension(extension_id, number, department_id=department_id)
Set extension
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.ExtensionsApi()
extension_id = 'extension_id_example' # str |
number = 'number_example' # str |
department_id = 'department_id_example' # str | (optional)
try:
# Set extension
api_response = api_instance.set_extension(extension_id, number, department_id=department_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling ExtensionsApi->set_extension: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| extension_id | str | ||
| number | str | ||
| department_id | str | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]