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.
Get aggregated ticket analytics data grouped by time periods (daily, weekly, monthly, quarterly) for a specific date range.
Example prompt
Get ticket analytics by time for the last quarter with monthly granularity
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 |
| timeGranularity | string | Yes | Time granularity: daily, weekly, monthly, or quarterly |
| teamIds | array | No | Optional array of team IDs to filter by |
| includeArchivedTickets | boolean | No | Include archived tickets (default: false) |
| includeTicketMetadata | boolean | No | Include minimal ticket metadata for drill-down (default: false) |
| metadataPage | number | No | Page number for metadata pagination (1-based, only used when includeTicketMetadata is true) |
| metadataLimit | number | No | Limit for metadata results per page (max 200, only used when includeTicketMetadata is true) |
Time granularity options
daily - Group data by day
weekly - Group data by week
monthly - Group data by month
quarterly - Group data by quarter
Response fields
The response will contain aggregated analytics data with the following structure:
| Field | Type | Description |
|---|
| aggregationType | string | Type of aggregation performed (“time”) |
| 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 |
| summary | object | Summary statistics across all time periods |
| aggregatedData | array | Array of team-based analytics objects with time breakdowns |
Summary object fields
The summary object contains:
| Field | Type | Description |
|---|
| avgTicketsPerPeriod | number | Average number of tickets per time period |
| peakPeriod | string | Time period with the highest ticket count |
| peakTicketCount | number | Number of tickets in the peak period |
| lowestPeriod | string | Time period with the lowest ticket count |
| lowestTicketCount | number | Number of tickets in the lowest period |
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 |
| percentage | number | Percentage of total tickets |
| timeBreakdown | object | Breakdown by time periods with detailed metrics |
Time period breakdown fields
Each time period in the timeBreakdown object contains:
| Field | Type | Description |
|---|
| period | string | The time period identifier (e.g., “2025-08-13”) |
| periodStart | string | Start timestamp of the time period |
| periodEnd | string | End timestamp of the time period |
| ticketCount | number | Number of tickets in this time period |
| createdCount | number | Number of tickets created in this time period |
| statusBreakdown | object | Breakdown by ticket status with counts and percentages |
| priorityBreakdown | object | Breakdown by ticket priority with counts and percentages |
| assigneeBreakdown | object | Breakdown by assignee with counts and percentages |
| sourceBreakdown | object | Breakdown by ticket source |
Sample response
{
"aggregationType": "time",
"totalTickets": 2,
"totalFound": 2,
"dateRange": {
"startDate": "2025-01-01",
"endDate": "2025-09-16"
},
"includeArchivedTickets": false,
"includeTicketMetadata": false,
"summary": {
"avgTicketsPerPeriod": 1,
"peakPeriod": "2025-08-13",
"peakTicketCount": 1,
"lowestPeriod": "2025-08-13",
"lowestTicketCount": 1
},
"aggregatedData": [
{
"teamId": "THEVVHPCCER33E",
"teamName": "Engineering",
"total": 2,
"percentage": 100,
"timeBreakdown": {
"2025-08-13": {
"period": "2025-08-13",
"periodStart": "2025-08-13T00:00:00.000Z",
"periodEnd": "2025-08-14T00:00:00.000Z",
"ticketCount": 1,
"createdCount": 1,
"statusBreakdown": {
"Open": {
"count": 1,
"percentage": 100,
"statusId": "3SC6BH2K10X5BSCXF2MFWVYZVYNFX"
}
},
"priorityBreakdown": {
"Urgent": {
"count": 1,
"percentage": 100,
"priorityId": "CSC6BH2K100SATQR0ZS6KHBW1DFPK"
}
},
"assigneeBreakdown": {
"John Doe": {
"count": 1,
"percentage": 100,
"assigneeId": "UTHOOQNUUXZQQ3",
"assigneeEmail": "john.doe@thena.ai"
}
},
"sourceBreakdown": {
"manual": 1
}
},
"2025-08-20": {
"period": "2025-08-20",
"periodStart": "2025-08-20T00:00:00.000Z",
"periodEnd": "2025-08-21T00:00:00.000Z",
"ticketCount": 1,
"createdCount": 1,
"statusBreakdown": {
"Open": {
"count": 1,
"percentage": 100,
"statusId": "3SC6BH2K10X5BSCXF2MFWVYZVYNFX"
}
},
"priorityBreakdown": {
"Medium": {
"count": 1,
"percentage": 100,
"priorityId": "CSC6BH2K10XR2ZVVY84VV8506YN80"
}
},
"assigneeBreakdown": {
"John Doe": {
"count": 1,
"percentage": 100,
"assigneeId": "UTHOOQNUUXZQQ3",
"assigneeEmail": "john.doe@thena.ai"
}
},
"sourceBreakdown": {
"manual": 1
}
}
}
}
]
}