Skip to main content

Departments Statistics

Returns a list of departments along with their incident counts, resolution time metrics, SLA compliance, and trend data.

Endpoint

GET /hubspot/stats/departments/:startDate/:endDate

URL Parameters

Request Headers

No request body is required.

Response

Success Response (HTTP 200)

Field Descriptions

departments[]


Error Response (HTTP 400–500)

Any non-200 response indicates failure.

Authentication

A valid JWT token must be included in the Authorization header.

Example Request (cURL)


Example Request (JavaScript - fetch)


Notes

  • Dates must follow the YYYY-MM-DD format.
  • Trend series and labels can be used directly to plot charts for each department.