Skip to content

Latest commit

 

History

History
732 lines (536 loc) · 23.8 KB

File metadata and controls

732 lines (536 loc) · 23.8 KB

liveagent_api.AgentsApi

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

Method HTTP request Description
convert_registered_visitor POST /agents/convert Convert registered visitor
delete_agent DELETE /agents/{userId} Agent
get_agent GET /agents/{userId} Agent
get_agent_statuses GET /agents/{userId}/status Get agent statuses in departments
get_agents GET /agents Agent list
get_agents_activity GET /agents/activity Agent Activity list
login_key GET /agents/{userId}/login_key Get login key
logout_agent POST /agents/{userId}/_logout Logout agent
pause_agent POST /agents/{userId}/_pause Pause agent
undelete_agent POST /agents/undelete Undelete agent
update_agent PUT /agents/{userId} Update agent
update_call_settings POST /agents/{userId}/updateVoiceStatus Update general voice status

convert_registered_visitor

Agent convert_registered_visitor(agent=agent)

Convert registered visitor

Convert registered visitor to agent

Example

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.AgentsApi(liveagent_api.ApiClient(configuration))
agent = liveagent_api.Agent() # Agent |  (optional)

try:
    # Convert registered visitor
    api_response = api_instance.convert_registered_visitor(agent=agent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->convert_registered_visitor: %s\n" % e)

Parameters

Name Type Description Notes
agent Agent [optional]

Return type

Agent

Authorization

apikey, privileges

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_agent

OkResponse delete_agent(user_id)

Agent

Deletes an agent

Example

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.AgentsApi(liveagent_api.ApiClient(configuration))
user_id = 'user_id_example' # str | 

try:
    # Agent
    api_response = api_instance.delete_agent(user_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->delete_agent: %s\n" % e)

Parameters

Name Type Description Notes
user_id str

Return type

OkResponse

Authorization

apikey, privileges

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_agent

Agent get_agent(user_id)

Agent

Retrieves an agent

Example

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.AgentsApi(liveagent_api.ApiClient(configuration))
user_id = 'user_id_example' # str | 

try:
    # Agent
    api_response = api_instance.get_agent(user_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->get_agent: %s\n" % e)

Parameters

Name Type Description Notes
user_id str

Return type

Agent

Authorization

apikey, privileges

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_agent_statuses

list[AgentStatus] get_agent_statuses(user_id)

Get agent statuses in departments

Gets agent statuses in departments

Example

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.AgentsApi(liveagent_api.ApiClient(configuration))
user_id = 'user_id_example' # str | 

try:
    # Get agent statuses in departments
    api_response = api_instance.get_agent_statuses(user_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->get_agent_statuses: %s\n" % e)

Parameters

Name Type Description Notes
user_id str

Return type

list[AgentStatus]

Authorization

apikey, privileges

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_agents

list[Agent] get_agents(page=page, per_page=per_page, sort_dir=sort_dir, sort_field=sort_field, filters=filters, _from=_from, to=to)

Agent list

List of agents

Example

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.AgentsApi(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)
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)
_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:
    # Agent list
    api_response = api_instance.get_agents(page=page, per_page=per_page, sort_dir=sort_dir, sort_field=sort_field, filters=filters, _from=_from, to=to)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->get_agents: %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]
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]
_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[Agent]

Authorization

apikey, privileges

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_agents_activity

list[AgentActivity] get_agents_activity(page=page, per_page=per_page, sort_dir=sort_dir, sort_field=sort_field, filters=filters, _from=_from, to=to)

Agent Activity list

List of online agents with their activity status (A - Available, B - Busy) and open tickets.

Example

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.AgentsApi(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)
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)
_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:
    # Agent Activity list
    api_response = api_instance.get_agents_activity(page=page, per_page=per_page, sort_dir=sort_dir, sort_field=sort_field, filters=filters, _from=_from, to=to)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->get_agents_activity: %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]
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]
_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[AgentActivity]

Authorization

apikey, privileges

HTTP request headers

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

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

login_key

LoginKey login_key(user_id)

Get login key

Get temporary (10 sec. valid ) key for user to login

Example

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.AgentsApi(liveagent_api.ApiClient(configuration))
user_id = 'user_id_example' # str | 

try:
    # Get login key
    api_response = api_instance.login_key(user_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->login_key: %s\n" % e)

Parameters

Name Type Description Notes
user_id str

Return type

LoginKey

Authorization

apikey, privileges

HTTP request headers

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

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

logout_agent

OkResponse logout_agent(user_id)

Logout agent

Logout an agent

Example

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.AgentsApi(liveagent_api.ApiClient(configuration))
user_id = 'user_id_example' # str | 

try:
    # Logout agent
    api_response = api_instance.logout_agent(user_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->logout_agent: %s\n" % e)

Parameters

Name Type Description Notes
user_id str

Return type

OkResponse

Authorization

apikey, privileges

HTTP request headers

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

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

pause_agent

OkResponse pause_agent(user_id)

Pause agent

Pauses an agent

Example

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.AgentsApi(liveagent_api.ApiClient(configuration))
user_id = 'user_id_example' # str | 

try:
    # Pause agent
    api_response = api_instance.pause_agent(user_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->pause_agent: %s\n" % e)

Parameters

Name Type Description Notes
user_id str

Return type

OkResponse

Authorization

apikey, privileges

HTTP request headers

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

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

undelete_agent

Agent undelete_agent(agent=agent)

Undelete agent

Undelete deleted agent

Example

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.AgentsApi(liveagent_api.ApiClient(configuration))
agent = liveagent_api.Agent() # Agent |  (optional)

try:
    # Undelete agent
    api_response = api_instance.undelete_agent(agent=agent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->undelete_agent: %s\n" % e)

Parameters

Name Type Description Notes
agent Agent [optional]

Return type

Agent

Authorization

apikey, privileges

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_agent

Agent update_agent(user_id, agent=agent)

Update agent

Update an agent

Example

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.AgentsApi(liveagent_api.ApiClient(configuration))
user_id = 'user_id_example' # str | 
agent = liveagent_api.Agent() # Agent |  (optional)

try:
    # Update agent
    api_response = api_instance.update_agent(user_id, agent=agent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->update_agent: %s\n" % e)

Parameters

Name Type Description Notes
user_id str
agent Agent [optional]

Return type

Agent

Authorization

apikey, privileges

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_call_settings

OkResponse update_call_settings(user_id, voice_status)

Update general voice status

Update general voice status

Example

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.AgentsApi(liveagent_api.ApiClient(configuration))
user_id = 'user_id_example' # str | 
voice_status = 'voice_status_example' # str | 

try:
    # Update general voice status
    api_response = api_instance.update_call_settings(user_id, voice_status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentsApi->update_call_settings: %s\n" % e)

Parameters

Name Type Description Notes
user_id str
voice_status str

Return type

OkResponse

Authorization

apikey, privileges

HTTP request headers

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

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