# Get analytics status for an environment

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

`GET /analytics/status`

Resource: **Analytics**

## Query parameters

- **`environment_id`** _(string, required)_
  The environment to report on. The caller must belong to it.

## 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.

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