> ## 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 by endpoint

> GET /console/usage/by-endpoint/

Returns request counts grouped by endpoint and HTTP method — useful for seeing which parts of the Management API an integration actually exercises. Lives on the **regular** Scanova API host (`qcg-api.scanova.io`), authenticated with your dashboard OAuth access token.

## Request

```
GET https://qcg-api.scanova.io/console/usage/by-endpoint/
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>

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

<ResponseExample>
  ```json 200 OK theme={null}
  [
    { "endpoint": "https://management.scanova.io/qr/", "method": "GET", "count": 2140, "error_rate": 0.004 },
    { "endpoint": "https://management.scanova.io/qr/", "method": "POST", "count": 318, "error_rate": 0.03 },
    { "endpoint": "https://management.scanova.io/qrcode/QR7K9M2XN/", "method": "PUT", "count": 96, "error_rate": 0.0 }
  ]
  ```
</ResponseExample>

### Response fields

The response is an array, one entry per distinct `(endpoint, method)` pair seen in the logs, sorted by `count` descending.

<ResponseField name="endpoint" type="string">
  The full request URL that was logged, including the path parameter's actual value (e.g. a specific `qrid`) — not a normalized route template. Expect many distinct entries for path-parameterized routes if you've called them with different IDs.
</ResponseField>

<ResponseField name="method" type="string">
  The HTTP method of the request, e.g. `GET`, `POST`, `PUT`, `DELETE`.
</ResponseField>

<ResponseField name="count" type="integer">
  Total requests logged for this endpoint/method pair.
</ResponseField>

<ResponseField name="error_rate" type="number">
  Fraction (`0`–`1`) of requests to this endpoint/method pair that returned a status code of `400` or above.
</ResponseField>

<Note>
  Unlike [Usage statistics](/api-reference/management-api/tokens/usage-stats) and [Daily usage](/api-reference/management-api/tokens/usage-daily), this endpoint has no `period`/`days` window — it aggregates over the full log retention period (request logs are purged after 6 months).
</Note>

## Errors

`environment` is required, same validation as [Usage statistics](/api-reference/management-api/tokens/usage-stats#errors).

## Related

* [Usage statistics](/api-reference/management-api/tokens/usage-stats) — the same traffic as a single rolling-window total instead of a per-endpoint breakdown.
* [Daily usage](/api-reference/management-api/tokens/usage-daily) — the same traffic broken out by calendar day instead of by route.
* [Management API overview](/api-reference/management-api/overview) — the `environment` values (`sandbox`, `live`, `zapier`, `mcp`) this endpoint aggregates by.


## OpenAPI

````yaml api-reference/openapi/management-api.json GET /console/usage/by-endpoint/
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/by-endpoint/:
    get:
      summary: Usage by endpoint
      operationId: getUsageByEndpoint
      parameters:
        - name: environment
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Usage grouped by endpoint
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.

````