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 RequiredThe first UTC date to include, in
YYYY-MM-DDformat. It must be earlier thanendand between1970-01-01and2262-04-11. -
:end
date RequiredThe first UTC date not to include, in
YYYY-MM-DDformat. It must be later thanstart, no later than2262-04-11, and no later than the day after the current UTC date. -
workspaces
array of stringThe 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
datetimeThe first date included in the response, represented as an ISO 8601 UTC timestamp (
YYYY-MM-DDT00:00:00Z). -
end
datetimeThe first date not included in the response, represented as an ISO 8601 UTC timestamp (
YYYY-MM-DDT00:00:00Z). -
metrics
array of objectThe 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 OptionalThe workspace represented by this series. The field is omitted for an organization-level series.
-
days
array of objectDaily usage metrics for this organization or workspace, ordered by UTC date. The array contains an entry for every day in the requested range.
-
day
dateThe UTC day represented by this entry.
-
profiles
64 bit intThe 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
0until the first observation. -
profilesAvg
64 bit intThe 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 intThe number of events accepted for ingestion on the day.
-
-
curl -G https://example.com/v1/metrics/usage/dates/2026-07-24/2026-07-28 \ -H "Authorization: Bearer api_xxxxxxx" \ -d "workspaces=5FbK8mR3nT6w,2nT6w5FbK8mR" {
"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
}
]
}
]
}