Skip to content

Latest commit

 

History

History
509 lines (369 loc) · 16.3 KB

File metadata and controls

509 lines (369 loc) · 16.3 KB

liveagent_api.TicketsApi

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

Method HTTP request Description
create_ticket POST /tickets Create ticket
delete_ticket DELETE /tickets/{ticketId} Deletes ticket
get_ticket GET /tickets/{ticketId} Gets ticket
get_ticket_attribute GET /tickets/{ticketId}/attributes/{attributeName} Gets ticket attribute
get_ticket_sla GET /tickets/{ticketId}/sla Gets ticket Sla
get_tickets_list GET /tickets Gets list of tickets
set_ticket_attribute PUT /tickets/{ticketId}/attributes/{attributeName} Sets ticket attribute
set_ticket_postpone PUT /tickets/{ticketId}/postpone Sets postpone status to ticket
update_ticket PUT /tickets/{ticketId} Updates ticket

create_ticket

TicketInformation create_ticket(ticket=ticket)

Create ticket

Create new ticket

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.TicketsApi()
ticket = liveagent_api.TicketListItem() # TicketListItem |  (optional)

try: 
    # Create ticket
    api_response = api_instance.create_ticket(ticket=ticket)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TicketsApi->create_ticket: %s\n" % e

Parameters

Name Type Description Notes
ticket TicketListItem [optional]

Return type

TicketInformation

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_ticket

OkResponse delete_ticket(ticket_id)

Deletes ticket

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.TicketsApi()
ticket_id = 'ticket_id_example' # str | 

try: 
    # Deletes ticket
    api_response = api_instance.delete_ticket(ticket_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TicketsApi->delete_ticket: %s\n" % e

Parameters

Name Type Description Notes
ticket_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_ticket

Ticket get_ticket(ticket_id)

Gets ticket

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.TicketsApi()
ticket_id = 'ticket_id_example' # str | 

try: 
    # Gets ticket
    api_response = api_instance.get_ticket(ticket_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TicketsApi->get_ticket: %s\n" % e

Parameters

Name Type Description Notes
ticket_id str

Return type

Ticket

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_ticket_attribute

TicketAttribute get_ticket_attribute(ticket_id, attribute_name)

Gets ticket attribute

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.TicketsApi()
ticket_id = 'ticket_id_example' # str | 
attribute_name = 'attribute_name_example' # str | 

try: 
    # Gets ticket attribute
    api_response = api_instance.get_ticket_attribute(ticket_id, attribute_name)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TicketsApi->get_ticket_attribute: %s\n" % e

Parameters

Name Type Description Notes
ticket_id str
attribute_name str

Return type

TicketAttribute

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_ticket_sla

TicketSla get_ticket_sla(ticket_id)

Gets ticket Sla

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.TicketsApi()
ticket_id = 'ticket_id_example' # str | 

try: 
    # Gets ticket Sla
    api_response = api_instance.get_ticket_sla(ticket_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TicketsApi->get_ticket_sla: %s\n" % e

Parameters

Name Type Description Notes
ticket_id str

Return type

TicketSla

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_tickets_list

list[Ticket] get_tickets_list(page=page, per_page=per_page, _from=_from, to=to, sort_dir=sort_dir, sort_field=sort_field, filters=filters)

Gets list of tickets

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.TicketsApi()
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 tickets
    api_response = api_instance.get_tickets_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 TicketsApi->get_tickets_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]
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[Ticket]

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]

set_ticket_attribute

OkResponse set_ticket_attribute(ticket_id, attribute_name, value)

Sets ticket attribute

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.TicketsApi()
ticket_id = 'ticket_id_example' # str | 
attribute_name = 'attribute_name_example' # str | 
value = 'value_example' # str | New attribute value

try: 
    # Sets ticket attribute
    api_response = api_instance.set_ticket_attribute(ticket_id, attribute_name, value)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TicketsApi->set_ticket_attribute: %s\n" % e

Parameters

Name Type Description Notes
ticket_id str
attribute_name str
value str New attribute value

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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

set_ticket_postpone

OkResponse set_ticket_postpone(ticket_id, postpone_data=postpone_data)

Sets postpone status to ticket

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.TicketsApi()
ticket_id = 'ticket_id_example' # str | 
postpone_data = liveagent_api.TicketPostpone() # TicketPostpone |  (optional)

try: 
    # Sets postpone status to ticket
    api_response = api_instance.set_ticket_postpone(ticket_id, postpone_data=postpone_data)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TicketsApi->set_ticket_postpone: %s\n" % e

Parameters

Name Type Description Notes
ticket_id str
postpone_data TicketPostpone [optional]

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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

update_ticket

Ticket update_ticket(ticket_id, ticket=ticket)

Updates ticket

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.TicketsApi()
ticket_id = 'ticket_id_example' # str | 
ticket = liveagent_api.TicketUpdatable() # TicketUpdatable |  (optional)

try: 
    # Updates ticket
    api_response = api_instance.update_ticket(ticket_id, ticket=ticket)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling TicketsApi->update_ticket: %s\n" % e

Parameters

Name Type Description Notes
ticket_id str
ticket TicketUpdatable [optional]

Return type

Ticket

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]