# Workspace: usage

> Rolled-up usage, newest day first, one row per day and metric

## Rolled-up usage, newest day first, one row per day and metric

`GET /v1/workspace/usage` · operation `listUsage`

Requires the `batondeck:billing:read` permission (action `plan:read`).

**Parameters**

| Name | In | Type | Required | Notes |
|---|---|---|---|---|
| `limit` | query | integer | yes |  |

**Responses**

| Status | Meaning |
|---|---|
| 200 | Rolled-up usage, newest day first, one row per day and metric |
| 400 | The arguments did not validate. |
| 401 | No portal session, and no live API key. |
| 403 | The policy refused, or the request was cross-site. |
| 404 | No such resource, or none this session may see. |

<details>
<summary>200 response schema</summary>

```json
{
  "type": "object",
  "properties": {
    "usage": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "day": {
            "type": "string"
          },
          "metric": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "day",
          "metric",
          "value"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "usage"
  ],
  "additionalProperties": false
}
```

</details>

```sh
curl -X GET 'https://api.batondeck.com/v1/workspace/usage' \
  -H "Authorization: Bearer $BATONDECK_API_KEY"
```
