Skip to main content

tickets

Creates, updates, deletes, gets or lists a tickets resource.

Overview​

Nametickets
TypeResource
Idovh.support.tickets

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
account_idstringCustomer account identifier (wire: accountId)
ticket_idintegerTicket identifier (wire: ticketId)
service_namestringName of service concerned by ticket (wire: serviceName)
can_be_closedbooleanCan this ticket be closed or not (wire: canBeClosed)
categorystringTicket request category (assistance, billing, incident)
creation_datestring (date-time)Ticket creation date (wire: creationDate)
last_message_fromstringSender type of last message (customer, support) (wire: lastMessageFrom)
productstringProduct 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)
scorestringTicket score
statestringState of ticket (closed, open, unknown)
subjectstringTicket subject
ticket_numberintegerTicket external number (wire: ticketNumber)
typestringTicket type (criticalIntervention, genericRequest)
update_datestring (date-time)Ticket last update date (wire: updateDate)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectticket_idGet ticket
listselectarchived, category, customer_reply_needed, exclude_autogenerated, max_creation_date, min_creation_date, page, page_size, product, service_name, status, subject, ticket_number, x_pagination_modeList support tickets identifiers for this service
createexecbody, subjectCreate a new ticket
closeexecticketIdClose ticket
reopenexecticketId, bodyReopen a ticket
replyexecticketId, bodyReply to ticket
scoreexecticketId, scoreSet 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.

NameDatatypeDescription
api_hoststringThe 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"}})
ticketIdintegerinternal ticket identifier
ticket_idintegerinternal identifier ticket (wire: ticketId)
archivedbooleanSearch archived tickets
categorystringSearch by ticket category
customer_reply_neededbooleanTickets pending a customer reply (wire: customerReplyNeeded)
exclude_autogeneratedbooleanExclude auto-generated tickets (wire: excludeAutogenerated)
max_creation_datestring (date-time)Maximum creation date (wire: maxCreationDate)
min_creation_datestring (date-time)Minimum creation date (wire: minCreationDate)
pageintegerPage of tickets to fetch (only if pageSize is defined)
page_sizeintegerNumber of ticket to fetch (wire: pageSize)
productstringSearch by ticket product
service_namestringTicket message service name (wire: serviceName)
statusstringStatus of ticket
subjectstringSearch by ticket subject
ticket_numberstringSearch by ticket number (wire: ticketNumber)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

Lifecycle Methods​

EXEC variables use wire (API) names.

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 }}"
}'
;