Skip to content
GET /analytics/breakdown

One metric over a date range, ranked by a dimension, highest first, with cursor pagination (next_cursor). Read live from the logs; a ranking is cached for 6 hours and its pages are served from it (the tenant, status, label and whether the account still exists are read live for each page). With dimension=integrated_account (metrics api_calls, billable_api_calls and errors), rows also carry the account's integration, its billable calls (calls) and the errors among them (errors; ranking by errors ranks on these), when it was last active, tenant id, current status and label, and search (a prefix of the account id) and tenant_id narrow the list. Only accounts that still exist in the environment are listed: one deleted since (on its own, or with its integration's uninstall) is left out, though its traffic still counts in the other breakdowns. A tenant_id with more than 1,000 accounts in the environment is refused.

Query Parameters

environment_idstring · uuid
required·

The environment to report on. The caller must belong to it.

fromstring · date

First UTC day (inclusive). Defaults to 30 days before to. Clamped to the 90-day window.

tostring · date

Last UTC day (inclusive). Defaults to today.

metricstring
required
Example: api_calls
dimensionstring
required
Example: integrated_account
limitinteger
cursorstring
searchstring

The start of an integrated account id (dimension=integrated_account only).

tenant_idstring

Only that tenant's accounts in this environment (dimension=integrated_account only). Refused when the tenant has more than 1,000 accounts here.

filterRecord<string, any>

Response Body

dimensionstring
environment_idstring · uuid
fromstring · date
metricstring
next_cursorstring
rowsobject[]
callsinteger
denominatornumber
errorsinteger
integrationstring
keystring
labelstring

The account's context.label (who or what it belongs to), for dimension=integrated_account. null when the account has no text label.

last_active_atstring · date-time

When the account was last seen in the range (UTC), for dimension=integrated_account.

last_active_daystring · date
numeratornumber
statusstring

The account's current status (not its status during the range).

tenant_idstring
valuenumber
tostring · date

Errors

StatusDescription
400Unknown metric, dimension or query parameter; a dimension the metric cannot be broken down by; an invalid limit or cursor; a value with control characters; search/tenant_id with a dimension other than integrated_account; or a tenant_id with more than 1,000 accounts in the environment
403Forbidden if the caller cannot reach the environment (an API token reaches its own environment only), or uses an integrated-account or tenant token
429More uncached analytics reads for this environment than the per-minute limit allows. Retry after the Retry-After header (60 seconds). Cached responses are not limited.
502The logs could not be read. The response carries a generic message; retry in a minute.
curl -X GET 'https://api.truto.one/analytics/breakdown' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
const response = await fetch('https://api.truto.one/analytics/breakdown', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/analytics/breakdown"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.get(url, headers=headers, params=params)
print(response.json())