Skip to content

Latest commit

 

History

History
285 lines (204 loc) · 8.79 KB

File metadata and controls

285 lines (204 loc) · 8.79 KB

liveagent_api.GroupsApi

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

Method HTTP request Description
create_group POST /groups Create contact group
delete_group DELETE /groups/{groupId} Delete contact group
get_group_by_id GET /groups/{groupId} Get contact group by group id
get_groups_list GET /groups Gets list of contact groups
update_group PUT /groups/{groupId} Update contact group

create_group

Group create_group(group=group)

Create contact group

Create new contact group

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.GroupsApi()
group = liveagent_api.Group() # Group |  (optional)

try: 
    # Create contact group
    api_response = api_instance.create_group(group=group)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling GroupsApi->create_group: %s\n" % e

Parameters

Name Type Description Notes
group Group [optional]

Return type

Group

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_group

OkResponse delete_group(group_id)

Delete contact group

Deletes a contact group

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.GroupsApi()
group_id = 'group_id_example' # str | 

try: 
    # Delete contact group
    api_response = api_instance.delete_group(group_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling GroupsApi->delete_group: %s\n" % e

Parameters

Name Type Description Notes
group_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_group_by_id

list[Group] get_group_by_id(group_id)

Get contact group by group 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.GroupsApi()
group_id = 'group_id_example' # str | 

try: 
    # Get contact group by group id
    api_response = api_instance.get_group_by_id(group_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling GroupsApi->get_group_by_id: %s\n" % e

Parameters

Name Type Description Notes
group_id str

Return type

list[Group]

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_groups_list

list[Group] get_groups_list(page=page, per_page=per_page, _from=_from, to=to)

Gets list of contact groups

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.GroupsApi()
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 contact groups
    api_response = api_instance.get_groups_list(page=page, per_page=per_page, _from=_from, to=to)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling GroupsApi->get_groups_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[Group]

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_group

list[Group] update_group(group_id, group=group)

Update contact group

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.GroupsApi()
group_id = 'group_id_example' # str | 
group = liveagent_api.Group() # Group |  (optional)

try: 
    # Update contact group
    api_response = api_instance.update_group(group_id, group=group)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling GroupsApi->update_group: %s\n" % e

Parameters

Name Type Description Notes
group_id str
group Group [optional]

Return type

list[Group]

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]