---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://truto.one/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Get analytics status for an environment

> Source: https://truto.one/docs/api-reference/admin/analytics/status/

`GET /analytics/status`

Resource: **Analytics**

**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`.
Callable with a dashboard session, an API token or a Platform MCP OAuth token; the caller must be able to reach the environment. A token reaches its own environment only.

## Query parameters

- **`environment_id`** _(string)_
  The environment to report on; the caller must be able to reach it. Required with a session. With an API token or a Platform MCP OAuth token it defaults to the token's environment.

## Response body

- **`environment_id`** _(string)_
- **`window`** _(object)_
  The first and last UTC day that can be requested. `to` is today.
  - **`from`** _(string)_
  - **`to`** _(string)_
- **`cache_seconds`** _(integer)_
  How long analytics responses are cached.

## 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 or a Platform MCP OAuth token reaches its own environment only), or uses an integrated-account or tenant token |

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/analytics/status' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
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);
```

### Python

```python
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())
```
