> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get compute usage

> Read core-seconds of compute usage across clusters for a time window.

`POST /api/v1/usage`

Read core-seconds of compute usage across clusters for a time window.

## Access

[Request a workspace OAuth token](https://docs.e6data.com/api-reference/workspace-oauth-2-0/post-oauth2-token.md#request) for the workspace that owns the resource. If your workspace uses OAuth scopes for API access, request `query_engine.usage:read`. If your admin confirms that workspace permissions are active for management API calls, omit the `scope` field for this call.

Use a workspace that has usage reporting enabled.

## Request

Body: start and end set the window. Optional clusters filters cluster names. timezone, granularity and format control presentation. Omit granularity for one total. Use hour, day or month for buckets.

Content type: `application/json`.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "start": "2026-11-01T00:00:00Z",
  "end": "2026-11-02T00:00:00Z",
  "clusters": [
    "reporting"
  ],
  "timezone": "UTC"
}
```

### Example request

Save the JSON request above as `request.json`.
Set `WORKSPACE_URL` to the same HTTPS workspace origin and `ACCESS_TOKEN` to the access token from that workspace.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --proto '=https' --silent --show-error --fail-with-body \
  --request POST \
  --header @- \
  --header 'Content-Type: application/json' \
  --data-binary @request.json \
  "$WORKSPACE_URL/api/v1/usage" <<< "Authorization: Bearer $ACCESS_TOKEN"
```

## Response

HTTP `200`. Content type: `application/json`.

Example response (selected fields and sample values):

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "workspace": "example",
  "start": "2026-11-01T00:00:00Z",
  "end": "2026-11-02T00:00:00Z",
  "coreSeconds": 120,
  "clusters": [
    {
      "cluster": "reporting",
      "coreSeconds": 120,
      "components": [
        {
          "component": "executor",
          "coreSeconds": 120
        }
      ]
    }
  ],
  "computedAt": "2026-11-02T01:00:00Z"
}
```

Availability depends on your workspace release and enabled features. Available where workspace usage reporting is configured. This POST reads data. The default format is JSON. CSV output is also supported.

## Troubleshooting

For `401`, check the workspace URL and token expiry. For `403`, ask your admin to check the machine client’s access to this operation and resource. In a scope-based workspace, also check the scope on the token. [Troubleshoot the token or request](https://docs.e6data.com/api-reference/list-clusters-with-oauth.md#troubleshoot-a-request).

## Related guides

[Workspace management guide](https://docs.e6data.com/platform/automate/authentication.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.