Usage metrics

Returns daily profile and event usage metrics for an organization or its workspaces.

If you specify a workspace with the Krenalis-Workspace header, or use an API key restricted to a workspace, the request applies only to that workspace. Otherwise, the request applies to the entire organization.

If you omit workspaces, the response contains one metric series for the organization or workspace associated with the request. If you specify workspaces, the response contains one series for each workspace that the request can access.

The API ignores workspace IDs that don't exist or aren't accessible to the request. If none of the specified workspaces match, metrics is an empty array.

Get usage metrics

Returns daily profile and event usage metrics from start up to, but not including, end.

The number of requested days multiplied by the number of returned series must not exceed 60,000. An organization-level request counts as one series.

Request

  • :start

    date Required

    The first UTC date to include, in YYYY-MM-DD format. It must be earlier than end and between 1970-01-01 and 2262-04-11.

  • :end

    date Required

    The first UTC date not to include, in YYYY-MM-DD format. It must be later than start, no later than 2262-04-11, and no later than the day after the current UTC date.

  • workspaces

    array of string

    The workspace IDs to return as separate metric series. You can provide 1 to 1,000 IDs as comma-separated values or by repeating the query parameter.

    If you omit this parameter, the response contains one series for the request's organization or workspace. The API ignores workspace IDs that don't exist or aren't accessible to the request.

Response

  • start

    datetime

    The first date included in the response, represented as an ISO 8601 UTC timestamp (YYYY-MM-DDT00:00:00Z).

  • end

    datetime

    The first date not included in the response, represented as an ISO 8601 UTC timestamp (YYYY-MM-DDT00:00:00Z).

  • metrics

    array of object

    The metric series returned by the request. If you specify workspaces, each accessible workspace has its own series. Otherwise, the response contains a single series for the organization or workspace associated with the request.

    • workspace

      string Optional

      The workspace represented by this series. The field is omitted for an organization-level series.

    • days

      array of object

      Daily usage metrics for this organization or workspace, ordered by UTC date. The array contains an entry for every day in the requested range.

      • day

        date

        The UTC day represented by this entry.

      • profiles

        64 bit int

        The most recent observed profile count for the day. If no profile count was observed that day, the most recent earlier value is carried forward. The value is 0 until the first observation.

      • profilesAvg

        64 bit int

        The time-weighted average profile count for the day, rounded to the nearest integer. For the current day, the average covers only the elapsed portion of the day. For completed days, it covers the full 24 hours.

      • events

        64 bit int

        The number of events accepted for ingestion on the day.

GET /v1/metrics/usage/dates/:start/:end
curl -G https://example.com/v1/metrics/usage/dates/2026-07-24/2026-07-28 \
-H "Authorization: Bearer api_xxxxxxx" \
-d "workspaces=5FbK8mR3nT6w,2nT6w5FbK8mR"
Response
{
  "start": "2026-07-24T00:00:00Z",
  "end": "2026-07-28T00:00:00Z",
  "metrics": [
    {
      "workspace": "5FbK8mR3nT6w",
      "days": [
        {
          "day": "2026-07-24",
          "profiles": 184200,
          "profilesAvg": 184200,
          "events": 1247300
        },
        {
          "day": "2026-07-25",
          "profiles": 196800,
          "profilesAvg": 189600,
          "events": 1384600
        },
        {
          "day": "2026-07-26",
          "profiles": 211400,
          "profilesAvg": 204100,
          "events": 1512900
        },
        {
          "day": "2026-07-27",
          "profiles": 211400,
          "profilesAvg": 211400,
          "events": 782400
        }
      ]
    }
  ]
}
Errors
401
Authorization header is missing or invalid
404
workspace does not exist
422
requested usage metric total exceeds the supported range; request metrics for individual workspaces instead
422
organization is disabled