Skip to main content

usage_quotas

GET /usage/quotas​

Read the project's evaluated plan quotas

The console's quota surface (WP-B2 req 14; WP-U7 consumes it): one entry per evaluated limit with a non-null value, where metric is the plan limit key (events_per_month, max_projects, concurrent_training_runs, …) and enforcement says whether breaching the limit currently produces denials (hard) or only warnings (soft, e.g. during a grandfathering deferral window). Derived from quota_state (https://spec.tessera.dev/schemas/quota_state.json), recomputed at least every 60 s. Tenancy resolves from the credential (003 §3); requires the read scope; console sessions scope via the X-Tessera-Project + X-Tessera-Environment headers (003 §2).

Operation ID: getUsageQuotas · Service: gateway-api

Authentication​

  • apiKey (http (bearer)) — Project API key (003 §2): tsk_live_… or tsk_test_… in Authorization: Bearer. Scoped to exactly one project + environment; scopes are a subset of ingest, read, admin. Keys are stored hashed and shown once at creation.
  • consoleSession (http (bearer)) — Console session (003 §2): Identity Platform JWT. Data-plane calls add X-Tessera-Project + X-Tessera-Environment headers, validated against org membership.

Responses​

StatusSchemaDescription
200UsageQuotasResponseEvaluated quotas for the credential's project.
defaultErrorEnvelopeError response (003 §1). Every non-2xx response uses this envelope; the HTTP status matches error.code. Rate-limited requests get 429 resource_exhausted with retry_after_seconds and a Retry-After header; the X-RateLimit-* headers ride on EVERY response, success or error (003 §1; plan-driven per API key + endpoint class — WP-B2). A 503 unavailable carries retry_after_seconds too for a lock-wait timeout (SQLSTATE 55P03), a rule preview at capacity (preview_capacity_exhausted), or a label preview during which the erasure of every entity holding its censor clock began (label_preview_clock_entity_erased): how long to wait before retrying.

Errors​

Every non-2xx response uses the 003 §1 error envelope; error.request_id matches the X-Request-Id response header, and the HTTP status always matches error.code:

{
"error": {
"code": "invalid_argument",
"details": [
{
"type": "field_violation"
}
],
"message": "human-readable",
"request_id": "req_01hxample"
}
}

Closed error-code set (003 §1): invalid_argument, unauthenticated, permission_denied, not_found, already_exists, failed_precondition, resource_exhausted, internal, unavailable.

resource_exhausted responses (HTTP 429) additionally carry retry_after_seconds. See ErrorEnvelope.