Get an analytics time series
/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
The environment to report on. The caller must belong to it.
api_callsDefaults to 30 days before to.
Defaults to today.
hour covers at most 7 days, for a metric with hourly data (see GET /analytics/metrics).
dayhour
category{"integration":"hubspot"}Response Body
Errors
| Status | Description |
|---|---|
400 | Unknown 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 |
403 | Forbidden if the caller cannot reach the environment (an API token reaches its own environment only), or uses an integrated-account or tenant token |
429 | More 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. |
502 | The 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())