---
title: "Get usage history"
method: GET
path: "/api/v1/usage/{customerId}/history/{featureId}"
tags: ["Usage"]
---

# Get usage history

`GET /api/v1/usage/{customerId}/history/{featureId}`

Retrieves historical usage data for a customer's metered feature over time.

## Path parameters

- `customerId` string, required
- `featureId` string, required

## Query parameters

- `resourceId` string, nullable
- `startDate` string, date-time, required
- `endDate` string, date-time
- `groupBy` string

## Headers

- `X-ACCOUNT-ID` string
- `X-ENVIRONMENT-ID` string

## Response `200`

Usage history data points for the specified period.

- UsageHistoryResponseDto — Response object
  - `data` object, required — Historical usage time series
    - `series` object[], required — Series of usage history
      - `tags` object[], required — Tags for the usage history series
        - `key` string, required — Key of the tag
        - `value` string, required — Value of the tag
      - `points` object[], required — Points in the usage history series
        - `timestamp` string, date-time, required — Timestamp of the usage history point
        - `value` number, required — Value of the usage history point
        - `isResetPoint` boolean, required — Indicates whether there was usage reset in this point, see `markers` for details
    - `markers` object[], required — Markers for events that affecting feature usage
      - `type` 'PERIODIC_RESET' | 'SUBSCRIPTION_CHANGE_RESET', required — Type of marker for a usage history point
      - `timestamp` string, date-time, required — Timestamp of the marker

## Other responses

- `400` — bad request.
- `401` — User is not authenticated.
- `403` — User is not allowed to access this resource.
- `404` — Usage history not found.
- `429` — Too many requests.

---

[API](https://skmtc.net/stiggio/apis/stigg-api.md) · [All operations](https://skmtc.net/stiggio/apis/stigg-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stiggio/stigg-api/revisions/3e2c8cfcd035/schema)
