All URIs are relative to https://localhost/api/v3
| Method | HTTP request | Description |
|---|---|---|
| get_department_list | GET /departments | Gets list of departments |
| get_specific_department | GET /departments/{departmentId} | Get department by specific id |
| if_agent_is_in_department | GET /departments/{departmentId}/{agentId} | Is the agent in the department |
list[Department] get_department_list(page=page, per_page=per_page, _from=_from, to=to, sort_dir=sort_dir, sort_field=sort_field, filters=filters)
Gets list of departments
from __future__ import print_function
import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: apikey
configuration = liveagent_api.Configuration()
configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'
# Configure OAuth2 access token for authorization: privileges
configuration = liveagent_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = liveagent_api.DepartmentsApi(liveagent_api.ApiClient(configuration))
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 | Filter as json object {\"column1\":\"value\", \"column2\":\"value\", ...} or list of filters as json array [[\"column\",\"operator\",\"value\"], ...] (optional)
try:
# Gets list of departments
api_response = api_instance.get_department_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 DepartmentsApi->get_department_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 | Filter as json object {"column1":"value", "column2":"value", ...} or list of filters as json array [["column","operator","value"], ...] | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Department get_specific_department(department_id)
Get department by specific id
from __future__ import print_function
import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: apikey
configuration = liveagent_api.Configuration()
configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'
# Configure OAuth2 access token for authorization: privileges
configuration = liveagent_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = liveagent_api.DepartmentsApi(liveagent_api.ApiClient(configuration))
department_id = 'department_id_example' # str |
try:
# Get department by specific id
api_response = api_instance.get_specific_department(department_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling DepartmentsApi->get_specific_department: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| department_id | str |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OkResponse if_agent_is_in_department(department_id, agent_id)
Is the agent in the department
from __future__ import print_function
import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: apikey
configuration = liveagent_api.Configuration()
configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'
# Configure OAuth2 access token for authorization: privileges
configuration = liveagent_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = liveagent_api.DepartmentsApi(liveagent_api.ApiClient(configuration))
department_id = 'department_id_example' # str |
agent_id = 'agent_id_example' # str |
try:
# Is the agent in the department
api_response = api_instance.if_agent_is_in_department(department_id, agent_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling DepartmentsApi->if_agent_is_in_department: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| department_id | str | ||
| agent_id | str |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]