GET https://api.gorilladash.com/api/v1/support-tickets/stats returns statistics about the support tickets in your organisation's help desk for a period you choose.
The Support Dashboard in Support Tickets always reports on the whole help desk, so compare it with an organisation key called without tribe_id. Where the dashboard shows the same figure, the API then gives the same number for the same dates: total tickets, currently open, SLA breaches, average resolution, open tickets by status and tickets per day. When nothing was resolved in the period, the dashboard shows an average resolution of 0 and the API returns null. The API also gives the total number resolved and the average time to the first reply, which the dashboard does not show. Two breakdowns are worked out differently. The dashboard's Top Categories lists only its ten largest named categories, while the API lists every category. The dashboard's Tickets by Location groups tickets by the organisation and tribe they came from, while the API groups them by your own tribes, as described under created_by_tribe below.
The endpoint returns counts and averages only. It never returns a ticket, its messages, the customer who raised it or the staff member who worked on it. To read a ticket, open it in Gorilla Dash.
Giving a key access
The endpoint is listed under Support > Support Tickets in the key's Permissions. Keys with Full Access, and keys made before endpoint permissions existed, can already read it. A key limited to chosen endpoints needs Support Tickets ticked, so create a new key with it ticked if yours does not have it.
Parameters
| Parameter | Notes |
|---|---|
start_date | The first day of the period, as YYYY-MM-DD. Defaults to 30 days before end_date. Without an end_date it cannot be later than today. |
end_date | The last day of the period, as YYYY-MM-DD, included in full. Defaults to today. It cannot be before start_date. |
tribe_id | Report on one tribe only. Organisation keys only; see below. |
Days run from midnight to midnight UTC. A period can be up to two years long; a longer one is refused with a 422. To report on one month, set start_date to its first day and end_date to its last.
Organisation and tribe keys
A tribe is one location, branch or business unit inside your organisation. A ticket belongs to a tribe when it was raised from that tribe or has been assigned to it, the same rule the tribe filter on the ticket list uses.
- An organisation key without
tribe_idreports on every ticket in the organisation's help desk. - An organisation key with
tribe_idreports on that tribe's tickets. The tribe must be one of the organisation's own; any other id is refused with a 422. - A tribe key always reports on its own tribe, and gets the same numbers the organisation key gets for it. Asking it for a different
tribe_idis refused with a 403.
What is counted
Support tickets and tasks in your help desk are counted. A ticket that was merged into another one is left out, because it is the same request reported twice. Some numbers are about the period you asked for and some are about right now:
| Field | Notes |
|---|---|
period | The start_date and end_date reported on, and the time zone the days are in (always UTC). |
tribe_id | The tribe reported on, or null for the whole help desk. |
generated_at | When the numbers were worked out, in UTC. |
created | Tickets raised during the period. |
resolved | Tickets that became Resolved or Closed during the period, whenever they were raised. |
resolved_by_status | The same tickets split into Resolved and Closed. Both are always listed, with a count of 0 when there are none. |
average_first_response_hours | For tickets raised during the period that have had a reply from your team, the average number of hours until the first reply, to one decimal place. Null when none have. |
average_resolution_hours | For tickets resolved during the period, the average number of hours from being raised to being resolved, to one decimal place. Null when none were. |
open | Tickets that are not Resolved or Closed right now, whenever they were raised. |
sla_breaches | Open tickets that are past their response deadline right now. The deadline follows your SLA setting and support hours, as the SLA badge on the ticket list does. |
open_by_status | The open tickets by status (New, Open, Waiting on User and so on), most first. |
created_by_category | Tickets raised during the period by category, most first. Tickets without a category are one entry whose category is null. |
created_by_tribe | Tickets raised during the period by tribe, with the tribe's tribe_id and tribe_name, most first. Tickets that are not linked to one of your tribes are one entry whose tribe is null. When you ask for one tribe, every ticket is listed under that tribe. |
created_by_day | Tickets raised on each day of the period, one entry per day including days with none. |
This endpoint is not cached, because its numbers change as tickets are raised and answered.