Agents Statistics
Returns a list of agents and their associated incident statistics, including counts, resolution metrics, and SLA performance.Endpoint
GET /hubspot/stats/agents/:startDate/:endDate
URL Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
startDate | string | ✅ | Start date (YYYY-MM-DD) |
endDate | string | ✅ | End date (YYYY-MM-DD) |
Request Headers
| Header | Value | Description |
|---|---|---|
Authorization | Bearer <token> | Authentication token |
No request body is required.
Response
Success Response (HTTP 200)
Field Descriptions
agents[]
| Field | Description |
|---|---|
name | Name of the agent |
generalStats.open | Number of open incidents assigned to the agent |
generalStats.closed | Number of closed incidents assigned to the agent |
resolution.times | Resolution time metrics (min, max, average, median) |
resolution.sla | SLA compliance metrics (within SLA, after SLA, percentage) |
Error Response (HTTP 400–500)
Any non-200 status code indicates an error.
Authentication
Provide a valid JWT token using theAuthorization header.
Example Request (cURL)
Example Request (JavaScript - fetch)
Notes
- Dates must use the format
YYYY-MM-DD. - Returned metrics can be used to compare agent performance across the date range.