Skip to content

get_api_management_v1_workspaces_slug_state

GET
/api/management/v1/workspaces/{slug}/state
curl --request GET \
--url https://example.com/api/management/v1/workspaces/example/state \
--header 'Authorization: Bearer <token>'

Read workspace state through the authenticated management service.

slug
required
string

Workspace management slug

Sanitized workspace state

Media typeapplication/json
object
agent_profiles
required

#998 — the workspace’s agent profiles, so an M2M caller can check a pin BEFORE launching instead of discovering a bad one as a 400. Deliberately the SHARED AgentProfileSummary projection rather than a management-local DTO: the decision about which profile columns may leave the instance is made once, in sc-svc-tenancy::agent_profiles_summary, so this surface and the profile.* MCP tools cannot drift apart. READ-ONLY — the apply (PUT) side takes a different struct (ManagementWorkspaceState) and ignores unknown sections, so this can never become a write path.

Array<object>

The outward-facing view of one agent profile: identity, lifecycle and what the profile PINS. Deliberately free of prompts, allowlists and open config bags — see the module header.

object
allow_tier_escalation

SC-3 — ADDED DELIBERATELY under this module’s #1161 rule: the Management API writes it and this projection is its only read-back; a governance pin like interactive_approval, not a secret.

boolean
created_at
required
string format: date-time
default_agent_type
required

The harness the profile runs (claude, codex, …).

string
description
string | null
effort_default
string | null
enabled
required

A disabled profile still resolves by id/slug, so a caller checking a pin must be able to see that it would not actually be selectable.

boolean
execution_mode
required
string
fixed_model
string | null
id
required
string format: uuid
interactive_approval
required

ADR 0045 §3.2 — does a task under this profile arm the interactive tool-approval gate? (resolve_interactive_approvals_for_run OR-folds it with the slider.)

#1161 — ADDED DELIBERATELY, per this module’s rule that widening is a decision. The reason: #1152 made a profile authorable from the Management API and from the profile.create/profile.update MCP tools, and BOTH write this column — but the only read-back either door has is this projection, so a provisioning run could set the gate and had no way to confirm it landed. A write with no matching read is not “one shape”; it is a shape you have to take on faith. It belongs with review_required: a governance PIN of the profile, not prompt or allowlist material, and the same class of fact the summary already answers (“what does this profile pin?”). It is not a secret and it widens no capability — the slider can arm the gate for every profile regardless of this flag.

boolean
is_workspace_default
required
boolean
model_policy
required

fixed | auto | … — together with fixed_model this is the answer to “which model does a task pinned to this profile actually get?”.

string
model_tier

SC-3 — the bound tier of a tier-policy profile.

string | null
name
required
string
placement_policy
One of:

SC-6 — ADDED DELIBERATELY under this module’s #1161 rule: the Management API and the profile.* MCP tools write the profile’s placement policy and this projection is their only read-back. It is a routing pin ({on_no_runner, queue_timeout_minutes}), validated to that closed shape on every write door, so it is not an open bag and carries no secret.

object
on_no_runner

One of [ON_NO_RUNNER_POLICIES]; absent or null inherits.

string | null
queue_timeout_minutes

Minutes a queued task waits for a runner, 1 to i32::MAX; absent or null inherits.

integer | null format: int32
review_required
required
boolean
slug
required
string
tags
required
Array<string>
updated_at
required
string format: date-time
version
required

Bumped on every profile edit — lets a caller detect that the thing it verified earlier is no longer the thing it is launching against.

integer format: int32
ai_credentials
required
Array<object>
object
account_email
string | null
expires_at
string | null format: date-time
fingerprint
string | null
id
required
string format: uuid
key
required
string
provider
string | null
scope
required
string
budget
One of:

FA-M1 — None when the reading token lacks management:budget:read. The full workspace-state read is gated only on workspaces:read, so the budget block is withheld (not merely zeroed) from a token without the granular scope, rather than bypassing it. The credential + variable blocks are withheld by returning EMPTY lists (their absence is indistinguishable from a workspace that has none — no shape change needed there).

object
alerts
required
Array<string>
api_mode_controls
required

{ api_key, oauth, system } ⇒ bool toggles. Runtime stays serde_json::Value; the spec types it as a Record<string, bool>.

object
key
additional properties
boolean
connected_subscriptions

#1026 — the OAuth subscriptions CONNECTED to this workspace, read from agent_oauth_tokens, independent of whether a quota window was ever measured. This is the surface’s PRESENCE source: deriving presence from per_provider_windows is what forced the #626 B1 seed to write a phantom window for every provider. With presence here, the seed can be provider-true and a provider with no readable quota (quota_readability == "none") shows as an account without a gauge instead of an empty gauge that never fills.

Array<object>

#1026 — one OAuth subscription CONNECTED to this workspace, independent of whether any quota window has ever been measured for it.

Presence and measurement are two different facts. The usage surface used to derive presence from provider_quota_state rows, which is precisely why the #626 B1 connect seed had to write two phantom windows for EVERY provider (without a row a fresh connect read as “No subscription credentials connected”). With presence sourced here, the seed is free to be provider-true — and a provider whose quota is not readable at all can be shown honestly, as an account with no gauge rather than an empty gauge.

object
account_email

OAuth account e-mail (or provider handle); None when the provider exposed none.

string | null
credential_id
required

The agent_oauth_tokens row id — the same id the windows carry as credential_id, so the FE joins the two without a heuristic.

string format: uuid
credential_kind
required

'oauth_token' | 'api_key' — the credential TABLE this account lives in, so the surface can render an API key’s own identity (label + plan) without guessing it from the provider. Added with the subscription API keys (opencode-go), whose presence was invisible while this list could only be built from OAuth tokens.

string
label

The user-given label of an API-key row (its identity, where an OAuth row has an account e-mail). Always None for an OAuth subscription.

string | null
plan_label

Plan/tier badge from agent_oauth_tokens.plan_label (mig 263); None for every OIDC provider (openai/google return no plan at connect).

string | null
provider
required
string
quota_readability
required

'probe' (a live provider endpoint answers) · 'harness' (only the harness reports windows, so a measurement appears after the first task) · 'none' (no producer exists — no quota is readable for this provider). From the declarative sc_svc_foundation::provider_windows table.

string
quota_unreadable_reason

#1160 — WHY the quota is unreadable, when quota_readability == "none"; None otherwise. 'no_provider_quota_api' · 'harness_reports_no_usage' · 'provider_not_modelled' — three DIFFERENT statements that the surface used to collapse into one causeless sentence beside an unrelated “never measured” line, which is what made an honest structural limit look like a broken measurement.

string | null
subscription_usage_ref

Mig 846 — the provider CONSOLE REFERENCE an API key carries (the usage console’s workspace id, e.g. the x-opencode-org-id value the Go usage endpoint takes), or None. An identifier, never a credential and never a plan: only providers whose usage is metered per console workspace accept one (usage_console_ref on the provider table), and no limit or percentage is derived from it.

string | null
usage_console_url

The provider’s OWN usage page (e.g. https://opencode.ai/console), from the declarative provider table — None where no page is verified. One source: the surface never keeps its own URL map.

string | null
critical_threshold_percent
required
number format: double
effective_month_spend_usd
required
number format: double
fill_target

The operator’s target window saturation in [0.0, 1.0] (e.g. 0.85) driving the throttling_soon warning, from the autonomy policy. None → the surface falls back to the Balanced default (GOTCHA-FILLTARGET).

number | null format: double
hard_stop
required
boolean
inflight_reserved_usd
required
number format: double
month_spend_usd
required
number format: double
monthly_cap_usd
number | null format: double
notional_month_spend_usd

#1644 S5 / F-58 — the month’s NOTIONAL cost of subscription runs: the harness-reported figure for a credential that was not billed per token. It is split out of month_spend_usd (billed) at the ledger read and is never a budget or gate input.

number format: double
own_subscription_spend

Usage-subscriptions — the own-spend ESTIMATE for subscription API keys: our own recorded spend per model and window, with NO limit and NO percentage (the provider’s allowance is console-scoped; the key states only a console reference). Deliberately NOT part of per_provider_windows: these rows are OUR arithmetic (measurement == "estimate"), the dispatch gate never reads them, and any surface that states a percentage as fact must not render one.

CONSUMER (#1644 S6 / lane USAGE-2 item 3.6): web/src/lib/components/reports/AccountUsageCard.svelte, fed by web/src/lib/reports/usage-account-groups.ts and rendered on web/src/routes/reports/usage/+page.svelte — label “estimate”, the provider console link keyed by credential kind, no percentage, and the unattributed_model scope shown as the text “unattributed model”.

Array<object>

ADR 0045 Stage 2a — one provider-quota window in the usage surface. Serialized by GET /api/settings/budget and GET /workspaces/{id}/usage. The COMPUTATION (from a [crate::services::provider_quota::QuotaState]) lives in calculations::window_status; this is the wire shape (+ Default so callers compile before that computation lands).

object
account_email

Human label for the credential’s account (OAuth account email), resolved in load_budget_status. None when unresolved (e.g. an Anthropic OAuth token whose scopes return no email — see the OAuth-email follow-up).

string | null
account_role

#626 Nutzung — 'primary' | 'overflow', DERIVED at read time (no column): per provider, the credential with the MOST headroom in its all-scope window is the primary (the one the quota-aware dispatcher prefers, mirroring provider_quota::multi_key::resolve_credential_with_most_headroom); the rest are overflow. Account-level — the same role is stamped on EVERY window of a credential (incl. its per-model windows). None when the provider has a single account (no overflow concept).

string | null
credential_id
required

The credential this window belongs to. Lets the FE list per-account windows distinctly when one provider has several connected accounts (#555).

string format: uuid
credential_type
required

'oauth_subscription' | 'api_key' — drives the FE capability detection (saturation gauges show only for subscription credentials).

string
fill_pct
required

Percent of the window consumed, 0.0..=100.0. 0.0 when the limit is unknown — a renderer must key a percentage on limit.is_some(), never on this value alone.

number format: double
freshness
required

#1160 — is what this snapshot says still true NOW? 'current' (the measured window is still open — these ARE the current figures) · 'outdated' (the window ENDED and nothing re-measured it yet; a last-known state, never the current utilisation) · 'unreported' (a whole further window passed with no measurement — nobody is reporting this window any more, so no surface may draw it).

The projection carried measured_at but no VERDICT on it, so every renderer had to invent its own staleness rule — and all three (web reports, web settings, chat /usage) simply drew a dead snapshot as live. Classified once by sc_svc_foundation::provider_windows::window_freshness from the window DEFINITION, so the answer cannot differ per surface.

string
limit

None = unknown limit (a new/Unsupported credential) ⇒ no gauge, no warning. It is ALWAYS None on the own-spend estimate rows: the provider’s allowance is console-scoped and the key states no limit.

number | null format: double
measured_at
required

#1025 — WHEN this snapshot was written (provider_quota_state.updated_at, set to now() on every upsert). The DTO carried window_start / resets_at / minutes_to_refresh but no measurement time at all, so the surface could not say how OLD a reading is — a two-week-stale gauge looked exactly like a fresh one. Required (the column is NOT NULL), so the FE never has to guess.

string format: date-time
measurement
required

#1026 — the PROVENANCE CLASS of this window, folded from [Self::source] by sc_svc_foundation::provider_windows::measurement_class: 'provider' (read from the provider, its harness, or a real 429) · 'estimate' (OUR spend arithmetic — telemetry; the provider reported nothing) · 'pending' (seeded, never measured). The FE must NOT render an estimate as a provider measurement: telemetry_estimate fills used from workspace_month_spend_ledger and limit from 80 % of the configured $-cap, yet it lands in the same subscription-saturation list as a real probe.

string
minutes_to_refresh

Whole minutes until resets_at; None if unknown.

integer | null format: int64
plan_label

#626 Nutzung — the subscription plan/tier badge (“Max 20x”, “ChatGPT Pro”, …) read off the credential’s agent_oauth_tokens.plan_label (migration 263), resolved in load_budget_status. None for an API key, a legacy row, or any provider whose OAuth profile body exposed no plan at connect.

string | null
provider
required
string
reset_credits

#626 D4.3 — the count of REDEEMABLE rate-limit-reset credits the provider advertises for this credential window (Codex rateLimitResetCredits.availableCount, migration 270). None = no reset-credit surface (every non-Codex window, and a Codex window probed before the spine read it). The FE renders it as a chip; the redeem/consume action is a follow-up.

integer | null format: int32
resets_at

When the window resets; None if unknown.

string | null format: date-time
scope
required

#626 H2 — the window’s scope: all (the credential’s overall budget) or model:<id> (a per-model sub-budget, e.g. a Codex Spark or Claude Sonnet window). ALWAYS present (the DB enforces NOT NULL DEFAULT 'all' and the projection clones it verbatim), so it is a REQUIRED string in the contract — no #[serde(default)] (this DTO is serialize-only; the attribute would only drop it from the OpenAPI required set). The FE renders per-model windows distinctly and sums per-account windows under one provider. The own-spend estimate list uses the one extra value unattributed_model for rows whose model cannot be spelled into a scope.

string
source
required

'real_limit_hit' | 'status_probe' | 'telemetry' | 'default' | 'task_boundary' — snapshot provenance so the FE can distinguish a hard hit from a low-confidence estimate.

string
throttling_soon
required

True when fill_pct is within the throttling band of fill_target — the FE surfaces an amber “approaching limit” state.

boolean
used
required
number format: double
window_start
required
string format: date-time
window_type
required

'rolling_5h' | 'weekly' | 'monthly'.

string
own_subscription_spend_failed

true when the own-spend read FAILED (best-effort: the endpoint still answers). The surface states “estimate unavailable” instead of implying “no spend of ours”, which is what an empty list alone would say.

boolean
per_provider_summary

#626 Nutzung — the same windows summed per (provider, window_type, scope) across a provider’s connected accounts (the “2 KONTEN · summiert” popover header). Derived from per_provider_windows; empty when there are no windows.

Array<object>

#626 Nutzung — one provider’s windows summed across its connected accounts, for the “2 KONTEN · summiert” popover header. One summary per (provider, window_type, scope) over the per-account [ProviderWindowStatus] list (the FE still lists the per-account rows underneath). Computed by calculations::aggregate_windows_by_provider.

object
account_count
required

How many distinct accounts (credentials) contribute to this summary.

integer format: int64
fill_pct
required

Percent of the summed window consumed, 0.0..=100.0; 0.0 when limit is None.

number format: double
limit

Sum of limit across the accounts — None when ANY account’s limit is unknown (an unknown limit is not assumed zero; the summed gauge would mislead).

number | null format: double
provider
required
string
scope
required

all (overall budget) or model:<id> (a per-model sub-budget) — windows are summed only within the SAME scope (an all window is never folded into a per-model one).

string
used
required

Sum of used across the accounts in this group.

number format: double
window_type
required

'rolling_5h' | 'weekly' | 'monthly'.

string
per_provider_windows

ADR 0045 Stage 2a — per-credential subscription/API saturation windows (one entry per (provider, window)), computed from the provider_quota_state snapshots by calculations::window_status. Empty on an API-key-only workspace with no quota snapshots (the $-bars above still apply).

Array<object>

ADR 0045 Stage 2a — one provider-quota window in the usage surface. Serialized by GET /api/settings/budget and GET /workspaces/{id}/usage. The COMPUTATION (from a [crate::services::provider_quota::QuotaState]) lives in calculations::window_status; this is the wire shape (+ Default so callers compile before that computation lands).

object
account_email

Human label for the credential’s account (OAuth account email), resolved in load_budget_status. None when unresolved (e.g. an Anthropic OAuth token whose scopes return no email — see the OAuth-email follow-up).

string | null
account_role

#626 Nutzung — 'primary' | 'overflow', DERIVED at read time (no column): per provider, the credential with the MOST headroom in its all-scope window is the primary (the one the quota-aware dispatcher prefers, mirroring provider_quota::multi_key::resolve_credential_with_most_headroom); the rest are overflow. Account-level — the same role is stamped on EVERY window of a credential (incl. its per-model windows). None when the provider has a single account (no overflow concept).

string | null
credential_id
required

The credential this window belongs to. Lets the FE list per-account windows distinctly when one provider has several connected accounts (#555).

string format: uuid
credential_type
required

'oauth_subscription' | 'api_key' — drives the FE capability detection (saturation gauges show only for subscription credentials).

string
fill_pct
required

Percent of the window consumed, 0.0..=100.0. 0.0 when the limit is unknown — a renderer must key a percentage on limit.is_some(), never on this value alone.

number format: double
freshness
required

#1160 — is what this snapshot says still true NOW? 'current' (the measured window is still open — these ARE the current figures) · 'outdated' (the window ENDED and nothing re-measured it yet; a last-known state, never the current utilisation) · 'unreported' (a whole further window passed with no measurement — nobody is reporting this window any more, so no surface may draw it).

The projection carried measured_at but no VERDICT on it, so every renderer had to invent its own staleness rule — and all three (web reports, web settings, chat /usage) simply drew a dead snapshot as live. Classified once by sc_svc_foundation::provider_windows::window_freshness from the window DEFINITION, so the answer cannot differ per surface.

string
limit

None = unknown limit (a new/Unsupported credential) ⇒ no gauge, no warning. It is ALWAYS None on the own-spend estimate rows: the provider’s allowance is console-scoped and the key states no limit.

number | null format: double
measured_at
required

#1025 — WHEN this snapshot was written (provider_quota_state.updated_at, set to now() on every upsert). The DTO carried window_start / resets_at / minutes_to_refresh but no measurement time at all, so the surface could not say how OLD a reading is — a two-week-stale gauge looked exactly like a fresh one. Required (the column is NOT NULL), so the FE never has to guess.

string format: date-time
measurement
required

#1026 — the PROVENANCE CLASS of this window, folded from [Self::source] by sc_svc_foundation::provider_windows::measurement_class: 'provider' (read from the provider, its harness, or a real 429) · 'estimate' (OUR spend arithmetic — telemetry; the provider reported nothing) · 'pending' (seeded, never measured). The FE must NOT render an estimate as a provider measurement: telemetry_estimate fills used from workspace_month_spend_ledger and limit from 80 % of the configured $-cap, yet it lands in the same subscription-saturation list as a real probe.

string
minutes_to_refresh

Whole minutes until resets_at; None if unknown.

integer | null format: int64
plan_label

#626 Nutzung — the subscription plan/tier badge (“Max 20x”, “ChatGPT Pro”, …) read off the credential’s agent_oauth_tokens.plan_label (migration 263), resolved in load_budget_status. None for an API key, a legacy row, or any provider whose OAuth profile body exposed no plan at connect.

string | null
provider
required
string
reset_credits

#626 D4.3 — the count of REDEEMABLE rate-limit-reset credits the provider advertises for this credential window (Codex rateLimitResetCredits.availableCount, migration 270). None = no reset-credit surface (every non-Codex window, and a Codex window probed before the spine read it). The FE renders it as a chip; the redeem/consume action is a follow-up.

integer | null format: int32
resets_at

When the window resets; None if unknown.

string | null format: date-time
scope
required

#626 H2 — the window’s scope: all (the credential’s overall budget) or model:<id> (a per-model sub-budget, e.g. a Codex Spark or Claude Sonnet window). ALWAYS present (the DB enforces NOT NULL DEFAULT 'all' and the projection clones it verbatim), so it is a REQUIRED string in the contract — no #[serde(default)] (this DTO is serialize-only; the attribute would only drop it from the OpenAPI required set). The FE renders per-model windows distinctly and sums per-account windows under one provider. The own-spend estimate list uses the one extra value unattributed_model for rows whose model cannot be spelled into a scope.

string
source
required

'real_limit_hit' | 'status_probe' | 'telemetry' | 'default' | 'task_boundary' — snapshot provenance so the FE can distinguish a hard hit from a low-confidence estimate.

string
throttling_soon
required

True when fill_pct is within the throttling band of fill_target — the FE surfaces an amber “approaching limit” state.

boolean
used
required
number format: double
window_start
required
string format: date-time
window_type
required

'rolling_5h' | 'weekly' | 'monthly'.

string
provider_inflight_reserved_usd
required

Per-provider in-flight reservation (USD). Runtime stays serde_json::Value; the spec types it as a Record<string, number>.

object
key
additional properties
number format: double
provider_monthly_caps_usd
required

Per-provider monthly cap (USD). Runtime stays serde_json::Value; the spec types it as a Record<string, number>.

object
key
additional properties
number format: double
provider_spend_usd
required

Per-provider month spend (USD). Runtime stays serde_json::Value; the spec types it as a Record<string, number>.

object
key
additional properties
number format: double
provider_windows_health
One of:

F-50 — how the window projection went: ok, or degraded because the quota read was refused / a row was skipped. Read it together with per_provider_windows: an empty list with read_failed means “nothing was read”, never “this workspace owns no window”.

None/absent means the response carries no verdict (a producer that predates it); a client must not read absence as “ok”.

object
read_failed
required

The provider_quota_state read was REFUSED. The window list is empty because nothing was read, not because the workspace owns no window.

boolean
skipped_rows
required

Rows dropped because their window_type is outside the closed wire set. They are counted (and logged), never silently discarded.

integer format: int64
status
required

'ok' — the read succeeded and every row projected · 'degraded' — the read was refused or at least one row was skipped (the two flags below say which).

string
remaining_usd
number | null format: double
status
required
string
threshold_alerts_percent
required
Array<number>
warning_threshold_percent
required
number format: double
git_credentials
required
Array<object>
object
account_email
string | null
expires_at
string | null format: date-time
fingerprint
string | null
id
required
string format: uuid
key
required
string
provider
string | null
scope
required
string
invites
required
Array<object>
object
email
required
string
role
required
string
mailbox_credentials
required
Array<object>
object
account_email
string | null
expires_at
string | null format: date-time
fingerprint
string | null
id
required
string format: uuid
key
required
string
provider
string | null
scope
required
string
marketplace_installs
required

#1214 — installed official-catalog listings, each with whether the catalog has moved past it. Empty on a workspace with no installs.

Array<object>

What the READ side reports back per installed listing.

object
name
required
string
project_key

#1549 — the project the install places its workflows in, as the project_key an apply names it with: the recorded target, else the one project the install’s own workflows live in. None when the install has no workflow in a project and recorded none.

string | null
slug
required
string
update_available
required

True when a newer non-withdrawn version exists in the catalog — the same question the #351 update signal answers in the UI, so a provisioning run can see drift without installing anything.

boolean
version
required
string
members
required
Array<object>
object
admin
boolean
approved
boolean
display_name
string | null
email
required
string
role
required
string
oauth_credentials
required
Array<object>
object
account_email
string | null
expires_at
string | null format: date-time
fingerprint
string | null
id
required
string format: uuid
key
required
string
provider
string | null
scope
required
string
projects
required
Array<object>
object
agent_commit_co_author
required

#1546 G1 — the project tier of the agent-commit co-author setting, null = inherit the workspace tier.

boolean | null
automations
required

The project’s automation arms allow management callers to read back the same validated configuration supplied through automations[] (#1161 D2). Ordered by kind; empty for a project with no arms.

Array<object>

#1161 D2 — the management read projection of ONE automation arm. Deliberately NARROW: it carries the arm identity, review_enabled and pipeline_config, and excludes the row’s webhook_secret — a read projection must not become a secret-exfiltration path.

object
enabled
required
boolean
kind
required
string
pipeline_config
required

#538 (mig 231) — the pipeline knobs bag: the return-to-sender loop’s max_rounds / max_cost_usd ceilings, the convergence level and the per-stage overrides.

review_enabled
required

#538 (mig 231) — the independent forensic audit tail.

boolean
autonomy_clamp
object | null
autonomy_level

The project autonomy override; null inherits the workspace level.

integer | null format: int32
autonomy_overrides
required
object
key
additional properties
backlog_classifier
required
string
backlog_daily_budget_usd
number | null format: double
backlog_max_concurrent
integer | null format: int32
backlog_max_waiting
integer | null format: int32
backlog_merge_policy
required
string
backlog_mode_enabled
required
boolean
backlog_required_reviewers
required
integer format: int32
closeout_config
object | null
daily_budget_usd
number | null format: double
denied_tools
required
Array<string>
git_credential_id
string | null format: uuid
git_default_branch

AUD-INT-054 — the project’s security-relevant settings, so an audit through this API sees which merge policy, autonomy and concurrency a project actually runs with. Visual-verify rides the arms’ pipeline_config. No secret: the webhook secret and credential material stay out.

string | null
git_provider
string | null
git_repo_url
string | null
id
required
string format: uuid
issue_close_policy
required
string
key
required
string
max_concurrent_runs
integer | null format: int32
memory_governance_policy
object | null
monthly_budget_usd
number | null format: double
name
required
string
read_namespace_bindings
required

#1549 item H — App backend functions bound to a live READ-namespace entitlement, in the apply shape. Withheld (empty) without the credentials read, like the repo_sync binding.

Array<object>

One bind-only READ declaration, by App slug and backend-function name.

object
app
required

The App’s stable slug in this workspace.

string
backend_function
required

The backend function of that App to bind.

string
entitlement_id
required

The EXISTING READ entitlement; it must already authorize this App.

string format: uuid
expect
required

What the caller expects the entitlement to authorize. Checked, never written.

object
entity

The entitlement’s entity (entity isolation), absent for a non-isolated one.

string | null
namespace_handle
required

The handle of the namespace the entitlement reads.

string
operation
required

Must be read_namespace_script, the only operation that reads a namespace.

string
script
required

The workspace’s own imported Script (by slug) the function runs.

string
repo_sync
One of:

The workspace git binding, or None when no binding exists. This is the read projection of the desired-state repo_sync block.

object
auto_push
required
boolean
branch
required
string
credential_resource

The resource NAME, resolved back from the stored id — so a read/apply round-trip is expressible in the same vocabulary. None means the binding carries no credential (a public repo), or the resource has since been deleted.

string | null
last_sync_at
string | null format: date-time
last_sync_sha
string | null
repo_url
required
string
sync_mode
required
string
schedules
required
Array<object>
object
agent_profile_id

#1161 C12 — the profile PIN this schedule fires under; null is the ungated (no-pin) shape. The schedule-side sibling of ManagementTaskInfo.agent_profile_id.

string | null format: uuid
agent_type
required
string
cadence
required
string
id
required
string format: uuid
interval_minutes
required

#908 — the step width of an interval cadence in minutes; null for calendar cadences.

integer | null format: int32
key
required
string
next_run_at
string | null format: date-time
status
required
string
title
required
string
tasks
required
Array<object>
object
agent_profile_id

#1161 C12 — the profile PIN this task was stored with, so an M2M caller can verify the gate it armed instead of probing the column with raw SQL. null is the ungated (no-pin) shape.

string | null format: uuid
agent_type
required
string
id
required
string format: uuid
key
required
string
project_id
string | null format: uuid
status
required
string
title
required
string
variables
required
Array<object>
object
created_at
required
string format: date-time
fingerprint
string | null
id
required
string format: uuid
is_secret
required
boolean
key
required
string
project_id
string | null format: uuid
value
required
string
workspace
required
object
agent_commit_co_author
required

#1546 G1 — the workspace tier of the agent-commit co-author setting, null = inherit the built-in default (ON).

boolean | null
id
required
string format: uuid
message_retention_days
required

AUD-WIR-051 — the mailbox retention window in days, null = the pinned default.

integer | null format: int32
name
required
string
owner_id
required
string format: uuid
slug
required
string

Example generated

{
"agent_profiles": [
{
"allow_tier_escalation": true,
"created_at": "2026-04-15T12:00:00Z",
"default_agent_type": "example",
"description": "example",
"effort_default": "example",
"enabled": true,
"execution_mode": "example",
"fixed_model": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"interactive_approval": true,
"is_workspace_default": true,
"model_policy": "example",
"model_tier": "example",
"name": "example",
"placement_policy": {
"on_no_runner": "example",
"queue_timeout_minutes": 1
},
"review_required": true,
"slug": "example",
"tags": [
"example"
],
"updated_at": "2026-04-15T12:00:00Z",
"version": 1
}
],
"ai_credentials": [
{
"account_email": "example",
"expires_at": "2026-04-15T12:00:00Z",
"fingerprint": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"key": "example",
"provider": "example",
"scope": "example"
}
],
"budget": {
"alerts": [
"example"
],
"api_mode_controls": {
"additionalProperty": true
},
"connected_subscriptions": [
{
"account_email": "example",
"credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"credential_kind": "example",
"label": "example",
"plan_label": "example",
"provider": "example",
"quota_readability": "example",
"quota_unreadable_reason": "example",
"subscription_usage_ref": "example",
"usage_console_url": "example"
}
],
"critical_threshold_percent": 1,
"effective_month_spend_usd": 1,
"fill_target": 1,
"hard_stop": true,
"inflight_reserved_usd": 1,
"month_spend_usd": 1,
"monthly_cap_usd": 1,
"notional_month_spend_usd": 1,
"own_subscription_spend": [
{
"account_email": "example",
"account_role": "example",
"credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"credential_type": "example",
"fill_pct": 1,
"freshness": "example",
"limit": 1,
"measured_at": "2026-04-15T12:00:00Z",
"measurement": "example",
"minutes_to_refresh": 1,
"plan_label": "example",
"provider": "example",
"reset_credits": 1,
"resets_at": "2026-04-15T12:00:00Z",
"scope": "example",
"source": "example",
"throttling_soon": true,
"used": 1,
"window_start": "2026-04-15T12:00:00Z",
"window_type": "example"
}
],
"own_subscription_spend_failed": true,
"per_provider_summary": [
{
"account_count": 1,
"fill_pct": 1,
"limit": 1,
"provider": "example",
"scope": "example",
"used": 1,
"window_type": "example"
}
],
"per_provider_windows": [
{
"account_email": "example",
"account_role": "example",
"credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"credential_type": "example",
"fill_pct": 1,
"freshness": "example",
"limit": 1,
"measured_at": "2026-04-15T12:00:00Z",
"measurement": "example",
"minutes_to_refresh": 1,
"plan_label": "example",
"provider": "example",
"reset_credits": 1,
"resets_at": "2026-04-15T12:00:00Z",
"scope": "example",
"source": "example",
"throttling_soon": true,
"used": 1,
"window_start": "2026-04-15T12:00:00Z",
"window_type": "example"
}
],
"provider_inflight_reserved_usd": {
"additionalProperty": 1
},
"provider_monthly_caps_usd": {
"additionalProperty": 1
},
"provider_spend_usd": {
"additionalProperty": 1
},
"provider_windows_health": {
"read_failed": true,
"skipped_rows": 1,
"status": "example"
},
"remaining_usd": 1,
"status": "example",
"threshold_alerts_percent": [
1
],
"warning_threshold_percent": 1
},
"git_credentials": [
{
"account_email": "example",
"expires_at": "2026-04-15T12:00:00Z",
"fingerprint": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"key": "example",
"provider": "example",
"scope": "example"
}
],
"invites": [
{
"email": "example",
"role": "example"
}
],
"mailbox_credentials": [
{
"account_email": "example",
"expires_at": "2026-04-15T12:00:00Z",
"fingerprint": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"key": "example",
"provider": "example",
"scope": "example"
}
],
"marketplace_installs": [
{
"name": "example",
"project_key": "example",
"slug": "example",
"update_available": true,
"version": "example"
}
],
"members": [
{
"admin": true,
"approved": true,
"display_name": "example",
"email": "example",
"role": "example"
}
],
"oauth_credentials": [
{
"account_email": "example",
"expires_at": "2026-04-15T12:00:00Z",
"fingerprint": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"key": "example",
"provider": "example",
"scope": "example"
}
],
"projects": [
{
"agent_commit_co_author": true,
"automations": [
{
"enabled": true,
"kind": "example",
"pipeline_config": "example",
"review_enabled": true
}
],
"autonomy_clamp": "example",
"autonomy_level": 1,
"autonomy_overrides": {
"additionalProperty": "example"
},
"backlog_classifier": "example",
"backlog_daily_budget_usd": 1,
"backlog_max_concurrent": 1,
"backlog_max_waiting": 1,
"backlog_merge_policy": "example",
"backlog_mode_enabled": true,
"backlog_required_reviewers": 1,
"closeout_config": "example",
"daily_budget_usd": 1,
"denied_tools": [
"example"
],
"git_credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"git_default_branch": "example",
"git_provider": "example",
"git_repo_url": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"issue_close_policy": "example",
"key": "example",
"max_concurrent_runs": 1,
"memory_governance_policy": "example",
"monthly_budget_usd": 1,
"name": "example"
}
],
"read_namespace_bindings": [
{
"app": "example",
"backend_function": "example",
"entitlement_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"expect": {
"entity": "example",
"namespace_handle": "example"
},
"operation": "example",
"script": "example"
}
],
"repo_sync": {
"auto_push": true,
"branch": "example",
"credential_resource": "example",
"last_sync_at": "2026-04-15T12:00:00Z",
"last_sync_sha": "example",
"repo_url": "example",
"sync_mode": "example"
},
"schedules": [
{
"agent_profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"agent_type": "example",
"cadence": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"interval_minutes": 1,
"key": "example",
"next_run_at": "2026-04-15T12:00:00Z",
"status": "example",
"title": "example"
}
],
"tasks": [
{
"agent_profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"agent_type": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"key": "example",
"project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"status": "example",
"title": "example"
}
],
"variables": [
{
"created_at": "2026-04-15T12:00:00Z",
"fingerprint": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"is_secret": true,
"key": "example",
"project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"value": "example"
}
],
"workspace": {
"agent_commit_co_author": true,
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"message_retention_days": 1,
"name": "example",
"owner_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"slug": "example"
}
}