tickets
Creates, updates, deletes, gets or lists a tickets resource.
Overview​
| Name | tickets |
| Type | Resource |
| Id | ovh.support.tickets |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
account_id | string | Customer account identifier (wire: accountId) |
ticket_id | integer | Ticket identifier (wire: ticketId) |
service_name | string | Name of service concerned by ticket (wire: serviceName) |
can_be_closed | boolean | Can this ticket be closed or not (wire: canBeClosed) |
category | string | Ticket request category (assistance, billing, incident) |
creation_date | string (date-time) | Ticket creation date (wire: creationDate) |
last_message_from | string | Sender type of last message (customer, support) (wire: lastMessageFrom) |
product | string | Product service concerned by ticket (adsl, cdn, dedicated, dedicated-billing, dedicated-other, dedicatedcloud, domain, exchange, fax, hosting, housing, iaas, mail, network, publiccloud, sms, ssl, storage, telecom-billing, telecom-other, vac, voip, vps, web-billing, web-other) |
score | string | Ticket score |
state | string | State of ticket (closed, open, unknown) |
subject | string | Ticket subject |
ticket_number | integer | Ticket external number (wire: ticketNumber) |
type | string | Ticket type (criticalIntervention, genericRequest) |
update_date | string (date-time) | Ticket last update date (wire: updateDate) |
Support Ticket
| Name | Datatype | Description |
|---|---|---|
account_id | string | Customer account identifier (wire: accountId) |
ticket_id | integer | Ticket identifier (wire: ticketId) |
service_name | string | Name of service concerned by ticket (wire: serviceName) |
can_be_closed | boolean | Can this ticket be closed or not (wire: canBeClosed) |
category | string | Ticket request category (assistance, billing, incident) |
creation_date | string (date-time) | Ticket creation date (wire: creationDate) |
last_message_from | string | Sender type of last message (customer, support) (wire: lastMessageFrom) |
product | string | Product service concerned by ticket (adsl, cdn, dedicated, dedicated-billing, dedicated-other, dedicatedcloud, domain, exchange, fax, hosting, housing, iaas, mail, network, publiccloud, sms, ssl, storage, telecom-billing, telecom-other, vac, voip, vps, web-billing, web-other) |
score | string | Ticket score |
state | string | State of ticket (closed, open, unknown) |
subject | string | Ticket subject |
ticket_number | integer | Ticket external number (wire: ticketNumber) |
type | string | Ticket type (criticalIntervention, genericRequest) |
update_date | string (date-time) | Ticket last update date (wire: updateDate) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ticket_id | Get ticket | |
list | select | archived, category, customer_reply_needed, exclude_autogenerated, max_creation_date, min_creation_date, page, page_size, product, service_name, status, subject, ticket_number, x_pagination_mode | List support tickets identifiers for this service | |
create | exec | body, subject | Create a new ticket | |
close | exec | ticketId | Close ticket | |
reopen | exec | ticketId, body | Reopen a ticket | |
reply | exec | ticketId, body | Reply to ticket | |
score | exec | ticketId, score | Set ticket score |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
ticketId | integer | internal ticket identifier |
ticket_id | integer | internal identifier ticket (wire: ticketId) |
archived | boolean | Search archived tickets |
category | string | Search by ticket category |
customer_reply_needed | boolean | Tickets pending a customer reply (wire: customerReplyNeeded) |
exclude_autogenerated | boolean | Exclude auto-generated tickets (wire: excludeAutogenerated) |
max_creation_date | string (date-time) | Maximum creation date (wire: maxCreationDate) |
min_creation_date | string (date-time) | Minimum creation date (wire: minCreationDate) |
page | integer | Page of tickets to fetch (only if pageSize is defined) |
page_size | integer | Number of ticket to fetch (wire: pageSize) |
product | string | Search by ticket product |
service_name | string | Ticket message service name (wire: serviceName) |
status | string | Status of ticket |
subject | string | Search by ticket subject |
ticket_number | string | Search by ticket number (wire: ticketNumber) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get ticket
SELECT
account_id,
ticket_id,
service_name,
can_be_closed,
category,
creation_date,
last_message_from,
product,
score,
state,
subject,
ticket_number,
type,
update_date
FROM ovh.support.tickets
WHERE ticket_id = '{{ ticket_id }}' -- required
;
List support tickets identifiers for this service
SELECT
account_id,
ticket_id,
service_name,
can_be_closed,
category,
creation_date,
last_message_from,
product,
score,
state,
subject,
ticket_number,
type,
update_date
FROM ovh.support.tickets
WHERE archived = '{{ archived }}'
AND category = '{{ category }}'
AND customer_reply_needed = '{{ customer_reply_needed }}'
AND exclude_autogenerated = '{{ exclude_autogenerated }}'
AND max_creation_date = '{{ max_creation_date }}'
AND min_creation_date = '{{ min_creation_date }}'
AND page = '{{ page }}'
AND page_size = '{{ page_size }}'
AND product = '{{ product }}'
AND service_name = '{{ service_name }}'
AND status = '{{ status }}'
AND subject = '{{ subject }}'
AND ticket_number = '{{ ticket_number }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- create
- close
- reopen
- reply
- score
Create a new ticket
EXEC ovh.support.tickets.create
@@json=
'{
"body": "{{ body }}",
"category": "{{ category }}",
"impact": "{{ impact }}",
"product": "{{ product }}",
"serviceName": "{{ serviceName }}",
"subcategory": "{{ subcategory }}",
"subject": "{{ subject }}",
"type": "{{ type }}",
"urgency": "{{ urgency }}",
"watchers": "{{ watchers }}"
}'
;
Close ticket
EXEC ovh.support.tickets.close
@ticketId='{{ ticketId }}' --required
;
Reopen a ticket
EXEC ovh.support.tickets.reopen
@ticketId='{{ ticketId }}' --required
@@json=
'{
"body": "{{ body }}"
}'
;
Reply to ticket
EXEC ovh.support.tickets.reply
@ticketId='{{ ticketId }}' --required
@@json=
'{
"body": "{{ body }}"
}'
;
Set ticket score
EXEC ovh.support.tickets.score
@ticketId='{{ ticketId }}' --required
@@json=
'{
"score": "{{ score }}",
"scoreComment": "{{ scoreComment }}"
}'
;