Get namespace usage stats
const url = 'https://example.com/v1/namespaces/example/stats';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://example.com/v1/namespaces/example/stats \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace name
Responses
Section titled “Responses”Aggregated daily usage + month/quota rollup (§4.2)
object
object
Current-month rollup + soft-quota state (§4.2), per account (across all
namespaces). This is the data source for the dashboard quota banner.
object
§4.2 anti-abuse ceiling for this plan; None when unconfigured.
Examplegenerated
{ "blocked": 1, "days": [ { "blocked": 1, "day": "example", "total": 1 } ], "month": { "hard_cap": 1, "month": "example", "over_quota": true, "quota": 1, "total": 1 }, "namespace": "example", "total": 1}Missing or invalid API key
The JSON body returned for every error response: { "error": "<message>" },
optionally with a stable machine code ({ "error": ..., "code": ... }).
The code lets clients map an error to their own localized copy instead of
showing the English error string; it is present only for errors we’ve
assigned a stable code, and omitted otherwise.
object
Stable machine-readable error code for client-side localization, when one
is defined for this error (e.g. key_not_found, algorithm_not_on_plan).
Human-readable error message. Never contains internal/driver detail.
Examplegenerated
{ "code": "example", "error": "example"}