Skip to content
GET /analytics/timeseries

One metric per day (or per hour for up to 7 days), read live from the logs and cached for 6 hours. Optionally grouped by a dimension (top 10 groups, the rest summed as __other__ for additive metrics) and filtered with filter[<dimension>]=<value>. The range is clamped to the 90-day window ending today; an hour later today is null, not 0.

Query Parameters

environment_idstring · uuid
required·

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

metricstring
required
Example: api_calls
fromstring · date

Defaults to 30 days before to.

tostring · date

Defaults to today.

granularitystring

hour covers at most 7 days, for a metric with hourly data (see GET /analytics/metrics).

Possible values:
dayhour
group_bystring
Example: category
filterRecord<string, any>
Example: {"integration":"hubspot"}

Response Body

bucketsstring[]
environment_idstring · uuid
fromstring · date
granularitystring
kindstring
metricstring
seriesobject[]
keystring
totalnumber
valuesnumber[]
tostring · date
unitstring

Errors

StatusDescription
400Unknown metric, dimension, filter or query parameter; a dimension or filter the metric does not support; a value with control characters; a malformed date; or a range outside the window
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/timeseries' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
const response = await fetch('https://api.truto.one/analytics/timeseries', {
  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/timeseries"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

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