Skip to content
GET /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

environment_idstring · uuid
required·

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

Response Body

cache_secondsinteger

How long analytics responses are cached.

Example: 21600
environment_idstring · uuid
windowobject

The first and last UTC day that can be requested. to is today.

fromstring · date
tostring · date

Errors

StatusDescription
400Missing environment_id, or a query parameter the route does not take
403Forbidden 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())