Get analytics status for an environment
/analytics/status
The days an environment's analytics can show. Analytics are read live from the logs and cover the last 90 days up to now (UTC). Responses are cached for cache_seconds.
Session-only (browser session cookie): the caller must belong to the environment. API tokens receive 403.
Query Parameters
The environment to report on. The caller must belong to it.
Response Body
How long analytics responses are cached.
21600The first and last UTC day that can be requested. to is today.
Errors
| Status | Description |
|---|---|
400 | Missing environment_id, or a query parameter the route does not take |
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 |
curl -X GET 'https://api.truto.one/analytics/status' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json'const response = await fetch('https://api.truto.one/analytics/status', {
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/status"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
response = requests.get(url, headers=headers, params=params)
print(response.json())