`GET /api/workspaces/{id}/usage/manage` (#1644 S6, F-49/F-51). RBAC: workspace admin/owner. Every current reading with its provenance class, scope, account, reader and age — the SAME shape the chat `/usage` row and the MCP `usage.get` tool read — plus the reader health and the threshold pair in force. Never a secret: credential IDs and account labels only.
const url = 'https://example.com/api/workspaces/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/usage/manage';const options = {method: 'GET', headers: {cookie: 'supacloud_session=<supacloud_session>'}};
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/api/workspaces/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/usage/manage \ --cookie supacloud_session=<supacloud_session>GET /api/workspaces/{id}/usage/manage (#1644 S6, F-49/F-51). RBAC: workspace
admin/owner. Every current reading with its provenance class, scope, account,
reader and age — the SAME shape the chat /usage row and the MCP usage.get tool
read — plus the reader health and the threshold pair in force. Never a secret:
credential IDs and account labels only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Workspace ID whose Manage view to read
Responses
Section titled “Responses”Every current reading with class, scope, account, reader and age, plus reader health
The whole Manage view of one workspace.
object
Every credential-reader pair carrying state.
One credential-reader pair’s health - the operator’s “last read failed: token expired” line, per credential.
object
The INSTANCE-wide reader switch in force (owner decision D1’s first layer).
unauthorized | forbidden | not_found | rate_limited | server |
malformed | transport | unsupported - a typed class, never response text.
The TENANT’s per-credential opt-out (D1’s second layer): true means no trigger reads this credential through a vendor-client reader, and the row states no reading it did not make.
The instant this view was assembled (the caller’s clock, so ages agree).
The rate limits providers stated (migration 885), ordered by provider, credential, model, level and dimension. A cap, never a fill.
One stated limit, as every Manage surface draws it.
object
The same label the credential’s windows carry.
Seconds between the read and the view, on the view’s clock.
requests, usage, async_queue or async_concurrency.
account (shared by every provider-side workspace) or workspace.
The period of a rate in seconds; absent for the async counts.
The provider-side account or workspace the limits were read for.
What a usage limit counts (total_tokens); absent otherwise.
One declared reader, its instance switch and its aggregated health.
object
measured | header | estimate | definition.
How many credential-reader pairs this declaration currently reads in the workspace (0 = declared but unused here).
The operator switch in force (owner decision D1: ON when unset).
The worst health of those pairs: ok (last read succeeded), failing
(consecutive failures), never (declared, never attempted), disabled.
False while the declaration is still Pending (no implementation in this
build). A surface must say so instead of implying a live reader.
official | headers | harness_local | back_door | own_metering |
definition - the section 6 ladder position.
The typed failure class of the worst pair, when it is failing.
The providers it reads; empty = every provider.
server | harness - where the read happens.
WHO last set the switch, when it is not the built-in default.
The ToS/risk note shown at enable time (section 6’s back-door contract).
The 80/95 pair in force for this instance, ascending.
Newest-first per provider/window/scope; closed windows are INCLUDED and
flagged (window_open), so a surface can draw them recessed instead of
silently dropping the fact that a window exists (F-49’s predecessor dropped
them, which hid a limit hit the moment its reset passed).
One current reading, as every Manage surface draws it.
object
The account label: the OAuth account e-mail, the key’s own label, the plan badge, or a short credential id when none of them is known. Never a secret.
Seconds since the observation - the age every row states (F-49, section 9).
measured | header | estimate | definition - HOW the number was
obtained. A surface MUST mark estimate as ours, never as a provider figure.
oauth_token | api_key.
Percent consumed, 0.0..=100.0, when the reading states a figure it is
entitled to. None = unknown; a surface must not draw an unknown as 0 %.
fresh | aging | stale | closed (section 7 rule 6, from the view).
True only when the ONE gate predicate would accept this reading.
Our own observed limit response: measured, but not a utilisation figure. Drawn as “limit hit”, never as a measured 100 % (F-34).
The window is spent but the provider bills overage instead of refusing.
The reader declaration that produced the reading (F-49’s “reader name”).
The reading this row was projected from - the evidence id a gate decision and an alert name.
all | model:<id> | family:<id>.
The reading’s unit (fraction, percent, usd, requests, tokens, …).
rolling_5h | weekly | monthly | daily.
Example generated
{ "health": [ { "account": "example", "backoff_until": "2026-04-15T12:00:00Z", "consecutive_failures": 1, "credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "credential_kind": "example", "enabled": true, "last_attempt_at": "2026-04-15T12:00:00Z", "last_error_class": "example", "last_success_at": "2026-04-15T12:00:00Z", "next_read_at": "2026-04-15T12:00:00Z", "opted_out": true, "provider": "example", "reader": "example" } ], "observed_at": "2026-04-15T12:00:00Z", "rate_limits": [ { "account": "example", "age_seconds": 1, "credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "credential_kind": "example", "dimension": "example", "level": "example", "limit_value": 1, "model": "example", "observed_at": "2026-04-15T12:00:00Z", "period_seconds": 1, "provider": "example", "provider_account_id": "example", "reader": "example", "usage_field": "example" } ], "readers": [ { "backoff_until": "2026-04-15T12:00:00Z", "class": "example", "consecutive_failures": 1, "credential_count": 1, "enabled": true, "health": "example", "implemented": true, "ladder": "example", "last_error_class": "example", "last_success_at": "2026-04-15T12:00:00Z", "providers": [ "example" ], "reader": "example", "scope": "example", "switch_reason": "example", "switched_at": "2026-04-15T12:00:00Z", "switched_by": "example", "tos_note": "example" } ], "thresholds": [ 1 ], "windows": [ { "account": "example", "age_seconds": 1, "class": "example", "credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "credential_kind": "example", "fill_pct": 1, "freshness": "example", "gate_eligible": true, "limit_hit": true, "minutes_to_reset": 1, "observed_at": "2026-04-15T12:00:00Z", "permits_overage": true, "plan_label": "example", "provider": "example", "reader": "example", "reading_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "resets_at": "2026-04-15T12:00:00Z", "scope": "example", "unit": "example", "used_fraction": 1, "window_open": true, "window_type": "example" } ], "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Authentication required
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Permission denied
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Structured server error
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}