Get organization-wide usage
const url = 'https://api.overwatch.weareheavy.dev/v1/usage?period=2026-06';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.overwatch.weareheavy.dev/v1/usage?period=2026-06' \ --header 'Authorization: Bearer <token>'The organization’s usage from the billing ledger: a monthly trend plus the per-site breakdown for one period. Deleted sites still appear under their hostname — billing outlives site churn.
Session-only, owner/admin: a site-scoped CMS key has no business reading org-wide aggregates.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “ Query Parameters ”Example
2026-06Billing period as YYYY-MM. Defaults to the latest month with usage.
Responses
Section titled “ Responses ”Monthly trend plus the selected period’s per-site breakdown.
object
One month of crawl usage.
object
UTC billing period, YYYY-MM.
The period bySite describes, or null when there is no usage yet.
One site’s usage within a billing period.
object
Denormalized at crawl time, so deleted sites still appear.
Example
{ "byMonth": [ { "billing_period": "2026-06" } ]}Missing or invalid credentials.
object
A human-readable error message.
Example
{ "error": "invalid api key"}A dashboard session is required (API-key callers are rejected), or the session’s role does not allow this action.
object
A human-readable error message.
Example
{ "error": "a dashboard session is required"}