---
title: "Get Connection Usage"
method: GET
path: "/api/connections/{id}/usage"
tags: ["Connections"]
---

# Get Connection Usage

`GET /api/connections/{id}/usage`

Returns the connection's API consumption over the last 24 hours, broken down by sync when the backend supports it.

Not all integrations support usage reporting.

- `callsLast24h` is null when the backend does not expose a usage count.
- `reportsSyncStats` is `false`, and `bySync` is empty, when the backend
  reports a total but cannot attribute calls to individual syncs.

When per-sync stats are available, each entry in `bySync` carries a
`categories` breakdown. **Category keys and labels are integration-specific.**
For example, Salesforce reports `rest` and `bulk` categories
(collapsing Bulk API v1 and v2 into a single `bulk` bucket), while another
integration may report an entirely different set or none at all. Treat `key`
as an opaque, backend-defined identifier and use `label` for display; do not
assume a fixed vocabulary across connection types.

## Path parameters

- `id` string, uuid, required — Unique identifier of the connection whose API consumption should be returned.

## Headers

- `X-Polytomic-Version` string

## Response `200`

OK

- GetConnectionUsageEnvelope
  - `data` ConnectionUsageResponse
    - `bySync` ConnectionUsageSyncStats[], nullable — Per-sync breakdown of API calls spent against this connection in the last 24 hours, sorted by total calls descending.
      - `categories` ConnectionUsageCategoryStats[], nullable — Per-category breakdown of the sync's calls, sorted by calls descending.
        - `calls` integer — Calls the sync spent in this category over the last 24 hours.
        - `key` string — Backend-defined category identifier (e.g. rest, bulk).
        - `label` string — Human-readable category name for display.
      - `lastRunAt` string, date-time, nullable — Start time of the sync's most recent execution, or null if it has never run.
      - `syncId` string, uuid — Unique identifier of the sync that spent the calls.
      - `syncName` string — Human-readable name of the sync, or empty if it could not be resolved.
      - `syncType` string — Kind of sync that spent the calls (model or bulk).
      - `totalCalls` integer — Total API calls the sync spent against this connection in the last 24 hours.
    - `callsLast24h` integer, nullable — Total backend API calls made through this connection over the last 24 hours, or null if the backend does not report usage.
    - `connectionId` string, uuid — Unique identifier of the connection the usage applies to.
    - `reportsSyncStats` boolean — True when the backend can break its API consumption down per sync; otherwise only the 24h total is reported.

## Other responses

- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/polytomic/apis/polytomic-api.md) · [All operations](https://skmtc.net/polytomic/apis/polytomic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/polytomic/polytomic-api/versions/5e9bcd4cfb2d/schema)
