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

# Usage statistics

> GET /console/usage/

Returns request-count totals for a given key environment over a rolling time window. Like the other `console/` endpoints, this lives on the **regular** Scanova API host (`qcg-api.scanova.io`), authenticated with your dashboard OAuth access token.

<Note>
  Figures are aggregated **across every key sharing the given `environment`** on your account, not a single key. If you want a single key's lifetime total, that's the `usage_count` field returned by [`GET /console/token/`](/api-reference/management-api/tokens/create#listing-existing-tokens).
</Note>

## Request

```
GET https://qcg-api.scanova.io/console/usage/
Authorization: Bearer <your_oauth_access_token>
```

<ParamField query="environment" type="string" required>
  One of `sandbox`, `live`, `zapier`, `mcp`. Selects which keys' logs to aggregate.
</ParamField>

<ParamField query="period" type="string" default="week">
  One of `day`, `week`, `month`, `year`. The rolling window ending now over which requests are counted.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -G "https://qcg-api.scanova.io/console/usage/" \
    -H "Authorization: Bearer <your_oauth_access_token>" \
    -d environment=live \
    -d period=month
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "total_requests": 4820,
    "successful_requests": 4761,
    "failed_requests": 59
  }
  ```
</ResponseExample>

### Response fields

<ResponseField name="total_requests" type="integer">
  Total requests logged for keys in this environment within the window.
</ResponseField>

<ResponseField name="successful_requests" type="integer">
  Requests that returned a status code below `400`.
</ResponseField>

<ResponseField name="failed_requests" type="integer">
  Requests that returned a status code of `400` or above.
</ResponseField>

## Errors

`environment` is required — omitting it, or passing a value outside the four listed above, returns:

```json 400 Bad Request theme={null}
{ "environment": ["A valid environment is required."] }
```

An invalid `period` returns:

```json 400 Bad Request theme={null}
{ "period": ["period must be one of day, week, month, year."] }
```

<Note>
  No rate limits are currently enforced on the Management API — these usage endpoints exist purely for visibility, not for policing a quota. See [Daily usage](/api-reference/management-api/tokens/usage-daily) for a per-day trend and [Usage by endpoint](/api-reference/management-api/tokens/usage-by-endpoint) for a breakdown by route.
</Note>

## Related

* [Daily usage](/api-reference/management-api/tokens/usage-daily) — the same figures, broken out per calendar day.
* [Usage by endpoint](/api-reference/management-api/tokens/usage-by-endpoint) — the same figures, broken out per route and method.
* [Create an API token](/api-reference/management-api/tokens/create) — where the per-key lifetime `usage_count` field (distinct from these environment-wide totals) comes from.


## OpenAPI

````yaml api-reference/openapi/management-api.json GET /console/usage/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    management.scanova.io (QR codes, folders, tags, leads, forms, analytics,
    plans, shared users & roles), plus the token-creation and usage-stats
    endpoints used to authenticate against it. Every path and request/response
    shape below was verified live against a real API key and the actual running
    backend (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://management.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /console/usage/:
    get:
      summary: Usage statistics
      operationId: getUsageStats
      parameters:
        - name: environment
          in: query
          required: true
          schema:
            type: string
        - name: period
          in: query
          schema:
            type: string
            enum:
              - day
              - week
              - month
              - year
      responses:
        '200':
          description: Usage stats
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. management.scanova.io) — the same key sent to
        the regular API host will not authenticate.

````