Get an analytics time series
GET
/analytics/timeseries
Query Parameters
environment_idstring · uuid
required·
The environment to report on. The caller must belong to it.
metricstring
required
Example:
api_callsfromstring · 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:
categoryfilterRecord<string, any>
Example:
{"integration":"hubspot"}Response Body
bucketsstring[]
environment_idstring · uuid
fromstring · date
granularitystring
kindstring
metricstring
seriesobject[]
keystring
totalnumber
valuesnumber[]
tostring · date
unitstring
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())