Documentation Index
Fetch the complete documentation index at: https://docs.thena.ai/llms.txt
Use this file to discover all available pages before exploring further.
Fetch ticket analytics grouped by status for a date range.
Example prompt
Get ticket analytics by status for the last week
Parameters
| Parameter | Type | Required | Description |
|---|
| dateRange | object | Yes | Inclusive date range to aggregate over |
| dateRange.startDate | string | Yes | Start date in YYYY-MM-DD format |
| dateRange.endDate | string | Yes | End date in YYYY-MM-DD format |
| includeArchivedTickets | boolean | No | Include archived tickets (default: false) |
| includeTicketMetadata | boolean | No | Include minimal ticket metadata for drill-down |
| teamIds | array | No | Optional array of team IDs to filter by |
| metadataPage | number | No | Page number for metadata pagination |
| metadataLimit | number | No | Limit for metadata results per page |
Response fields
The response will contain aggregated analytics data with the following structure:
| Field | Type | Description |
|---|
| aggregationType | string | Type of aggregation performed (“status”) |
| totalTickets | number | Total number of tickets in the date range |
| totalFound | number | Total number of tickets found matching criteria |
| dateRange | object | The date range used for the analysis |
| includeArchivedTickets | boolean | Whether archived tickets were included |
| includeTicketMetadata | boolean | Whether ticket metadata was included |
| aggregatedData | array | Array of team-based analytics objects with status breakdowns |
Team analytics object fields
Each team in the aggregatedData array contains:
| Field | Type | Description |
|---|
| teamId | string | Team unique identifier |
| teamName | string | Team name |
| total | number | Total number of tickets for this team |
| ticketCount | number | Number of tickets for this team (may be 0 for status aggregation) |
| assignees | object | Assignee breakdown (empty for status aggregation) |
| statusBreakdown | object | Status breakdown for this team’s tickets |
| assigneeBreakdown | object | Assignee breakdown for this team’s tickets |
| priorityBreakdown | object | Priority breakdown for this team’s tickets |
| sentimentBreakdown | object | Sentiment breakdown for this team’s tickets |
Status/Assignee/Priority/Sentiment breakdown fields
Each status, assignee, priority, or sentiment in the breakdowns contains:
| Field | Type | Description |
|---|
| ticketCount | number | Number of tickets with this status/assignee/priority/sentiment |
| percentage | number | Percentage of team tickets |
| statusId/assigneeId/priorityId/sentimentId | string | Unique identifier for the status/assignee/priority/sentiment |
Sample response
{
"aggregationType": "status",
"totalTickets": 2,
"totalFound": 2,
"dateRange": {
"startDate": "2025-01-01",
"endDate": "2025-09-16"
},
"includeArchivedTickets": false,
"includeTicketMetadata": false,
"aggregatedData": [
{
"teamId": "THEVVHPCCER33E",
"teamName": "Engineering",
"total": 2,
"ticketCount": 0,
"assignees": {},
"statusBreakdown": {
"Open": {
"ticketCount": 2,
"percentage": 100,
"statusId": "3SC6BH2K10X5BSCXF2MFWVYZVYNFX"
}
},
"assigneeBreakdown": {
"John Doe": {
"ticketCount": 2,
"percentage": 100,
"assigneeId": "UTHOOQNUUXZQQ3"
}
},
"priorityBreakdown": {
"Urgent": {
"ticketCount": 1,
"percentage": 50,
"priorityId": "CSC6BH2K100SATQR0ZS6KHBW1DFPK"
},
"Medium": {
"ticketCount": 1,
"percentage": 50,
"priorityId": "CSC6BH2K10XR2ZVVY84VV8506YN80"
}
},
"sentimentBreakdown": {
"Neutral": {
"ticketCount": 1,
"percentage": 50,
"sentimentId": "MSC6BH2K1052GKT05M6QTFZVTPQ3S"
},
"Negative": {
"ticketCount": 1,
"percentage": 50,
"sentimentId": "MSC6BH2K10CBVVTXD3Y6J5AC3X8R2"
}
}
}
]
}