Skip to main content

Incidents Trend

Retrieve the trend of incidents for a given date range.
This endpoint returns:
  • labels: an array of dates in the interval
  • series: number of incidents for each corresponding date

Endpoint

GET /hubspot/stats/incidents-trend/:startDate/:endDate

URL Parameters

Request Headers

Note: No request body is required.

Response

Success Response (HTTP 200)

  • labels: Dates between startDate and endDate
  • series: Number of incidents created on each date

Error Response (HTTP 400–500)

Any non-200 status code indicates an error.

Authentication

This endpoint requires user authentication via Authorization: Bearer <token>.
No user data should be sent — it is populated internally.

Example Request (cURL)

Example Request (JavaScript - fetch)

Notes

  • Dates must follow YYYY-MM-DD format.
  • Dates without incidents will appear in labels with 0 count in series.
  • Trend calculation is computed server-side using the ticket creation date.