Tickets
Tickets: 4 operations of the ChaosDesk REST API.
- GET
/api/ticketsRetrieves the collection of Ticket resources. - POST
/api/ticketsCreates a Ticket resource. - GET
/api/tickets/{id}Retrieves a Ticket resource. - PATCH
/api/tickets/{id}Updates the Ticket resource.
Retrieves the collection of Ticket resources.
Lists tickets the caller may see. Page-based by default (page, itemsPerPage). For exports and syncs, use cursor pagination: send cursor= (empty) for the first page and follow links.next; results are ordered by id (creation order).
Parameters
pageintegerquery- The collection page number
itemsPerPageintegerquery- The number of items per page
numberintegerquerynumber[]integer[]querystatusstringquerystatus[]string[]queryprioritystringquerypriority[]string[]querytypestringquerytype[]string[]queryviastringqueryvia[]string[]queryassigneestringqueryassignee[]string[]querygroupstringquerygroup[]string[]queryrequesterstringqueryrequester[]string[]queryorganizationstringqueryorganization[]string[]querybrandstringquerybrand[]string[]queryexists[assignee]booleanqueryexists[group]booleanquerycreated_at[before]stringquerycreated_at[strictly_before]stringquerycreated_at[after]stringquerycreated_at[strictly_after]stringqueryupdated_at[before]stringqueryupdated_at[strictly_before]stringqueryupdated_at[after]stringqueryupdated_at[strictly_after]stringquerysolved_at[before]stringquerysolved_at[strictly_before]stringquerysolved_at[after]stringquerysolved_at[strictly_after]stringqueryorder[number]"asc" | "desc"queryorder[updated_at]"asc" | "desc"queryorder[created_at]"asc" | "desc"queryorder[status]"asc" | "desc"queryorder[priority]"asc" | "desc"queryorder[subject]"asc" | "desc"querycursorstringquery- Opt into cursor pagination. Empty for the first page, then the opaque
meta.after_cursor/meta.before_cursorvalue. limitintegerquery- Cursor page size (1-100, default 25).
Responses
200Ticket collection403Forbidden
Example request
curl -X GET "https://yourcompany.chaosdesk.io/api/tickets" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" Creates a Ticket resource.
Request body application/json
subjectstringrequiredcommentCommentInput | nullrequiredrequester_idstring | null (uuid)requesterRequesterInput | nullassignee_idstring | null (uuid)group_idstring | null (uuid)organization_idstring | null (uuid)brand_idstring | null (uuid)problem_idstring | null (uuid)form_idstring | null (uuid)status"new" | "open" | "pending" | "hold" | "solved" | "closed" | nullcustom_status_idstring | null (uuid)- Zendesk
custom_status_id(wins overstatus). priority"low" | "normal" | "high" | "urgent" | nulltype"question" | "incident" | "problem" | "task" | nulldue_atstring | null (date-time)tagsstring[]custom_fieldsCustomFieldInput[]collaborator_idsstring[]
Responses
201Ticket resource created400Invalid input403Forbidden422An error occurred
Example request
curl -X POST "https://yourcompany.chaosdesk.io/api/tickets" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"subject":"string","comment":"string"}' Retrieves a Ticket resource.
Parameters
idstringpathrequired- Ticket identifier
Responses
200Ticket resource403Forbidden404Not found
Example request
curl -X GET "https://yourcompany.chaosdesk.io/api/tickets/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" Updates the Ticket resource.
Parameters
idstringpathrequired- Ticket identifier
Request body application/merge-patch+json
subjectstringstatus"new" | "open" | "pending" | "hold" | "solved" | "closed"custom_status_idstring (uuid)- Zendesk
custom_status_id: the ticket's status becomes the custom status's category. priority"low" | "normal" | "high" | "urgent"type"question" | "incident" | "problem" | "task" | nulldue_atstring | null (date-time)assignee_idstring | null (uuid)group_idstring | null (uuid)requester_idstring (uuid)organization_idstring | null (uuid)problem_idstring | null (uuid)form_idstring | null (uuid)tagsstring[]- replaces all tags
additional_tagsstring[]remove_tagsstring[]custom_fieldsCustomFieldInput[]add_collaborator_idsstring[]remove_collaborator_idsstring[]add_follower_idsstring[]remove_follower_idsstring[]commentCommentInputmacro_idsstring[]- macros applied to this draft (Zendesk
macro_ids): their tag changes are allowed without ticket.edit_tags time_spentinteger- Seconds the agent spent on this update (Zendesk Time Tracking app); App\TimeTracking\TimeTrackingHook.
versioninteger- Safe update: the ticket version the client last saw.
Responses
200Ticket resource updated400Invalid input403Forbidden404Not found422An error occurred
Example request
curl -X PATCH "https://yourcompany.chaosdesk.io/api/tickets/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/merge-patch+json" \
-d '{"subject":"string","status":"string"}'