# Usage

> 1 endpoint: retrieve api usage.

- [Retrieve API usage](#retrieve-api-usage): `GET /v1/usage`

### Retrieve API usage

`GET /v1/usage`

Counts this Workspace's API requests per day over the last 30 days, with errors and rate-limited requests.

Permission: `usage:read`

#### Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `days` | integer | No |  (1 to 30, default 30) |

#### Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | `"usage"` | Yes |  |
| `from` | string | Yes | ISO 8601 date and time, UTC. |
| `to` | string | Yes | ISO 8601 date and time, UTC. |
| `totals` | object | Yes |  |
| `totals.requests` | integer | Yes |  (-9007199254740991 to 9007199254740991) |
| `totals.errors` | integer | Yes |  (-9007199254740991 to 9007199254740991) |
| `totals.rate_limited` | integer | Yes |  (-9007199254740991 to 9007199254740991) |
| `days` | array of object | Yes |  |
| `days[].date` | string | Yes |  |
| `days[].requests` | integer | Yes |  (-9007199254740991 to 9007199254740991) |
| `days[].errors` | integer | Yes |  (-9007199254740991 to 9007199254740991) |
| `days[].rate_limited` | integer | Yes |  (-9007199254740991 to 9007199254740991) |

```bash
curl https://api.nowscale.com/v1/usage \
  -H "Authorization: Bearer $NOWSCALE_API_KEY"
```
