# One workspace's usage

> Totals and one row per UTC day for a workspace of this partner.

Source: https://docs.spicrawl.com/api-reference/partner/partner-workspace-usage

## GET /v1/partner/workspaces/{external_user_id}/usage

Operation ID: `partnerWorkspaceUsage`. API key scope: `partner`.

Totals and one row per UTC day for a workspace of this partner. A deleted workspace is not found.

### Example

```bash
curl "https://api.spicrawl.com/v1/partner/workspaces/{external_user_id}/usage" \
  -H "Authorization: Bearer $SPICRAWL_API_KEY"
```

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `external_user_id` | path | string | yes |  |
| `from` | query | string (date) | no |  |
| `to` | query | string (date) | no | Exclusive. |

### Responses

#### 200

The workspace's usage.

`application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `external_user_id` | string | yes |  |
| `period` | object | yes |  |
| `totals` | object (`PartnerUsageTotals`) | yes |  |
| `rows` | array of object | yes |  |

#### 400

The request is invalid. Not retryable; fix the request using `code` and `diagnostics.hint`.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 401

Missing, invalid, revoked or expired key. Not retryable with the same key.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 403

The key lacks the scope this route requires (`ERR::AUTH::INSUFFICIENT_SCOPE`), or the action is not permitted.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 404

No such resource for this key's organization.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 500

Internal error. Retryable when `retryable` is true.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

Full OpenAPI spec: https://docs.spicrawl.com/openapi.yaml
