Management API
The Management API is SupaCloud’s machine-to-machine (M2M) surface for infrastructure-as-code: provisioning workspaces, projects, credentials, secrets, budgets, tasks, and schedules. It uses bearer-token authentication and desired-state (idempotent) semantics.
Endpoints live under:
/api/management/v1/workspaces/{slug}/...with organization administration (not slug-scoped) under
/api/management/v1/organizations*.
The committed specifications live at docs/openapi/management.json and
docs/openapi/public.json; regenerate them with:
cargo run -p supacloud-server --bin export_openapi -- --out docs/openapiAutonomy & coherence (v0.2.0, ADR 0045)
Section titled “Autonomy & coherence (v0.2.0, ADR 0045)”The Autonomous Delivery Engine adds three per-workspace endpoints so an IaC consumer can read and seed the autonomy posture and inspect what is waiting on a human. They are slug-scoped under the usual workspace prefix.
| Method & path | Description |
|---|---|
GET /api/management/v1/workspaces/{slug}/config/autonomy |
Read the resolved autonomy config: the stored set_level (0–100) and set_overrides, plus the resolved effective_level, plan_ceiling, onboarding_cap and the resolved policy (dispatch / ask / effort / merge). The ceilings explain why an effective level may be clamped below the set level. |
PUT /api/management/v1/workspaces/{slug}/config/autonomy |
Set the autonomy config. Body: level (0–100, clamped to the plan ceiling before persist) and optional overrides — when omitted the stored overrides are left unchanged; pass {} to clear them. Returns the same view as the GET. |
GET /api/management/v1/workspaces/{slug}/approvals?type=tool|workflow |
List the pending human decision gates. There is no single approvals table: type=tool lists the interactive tool/question/visual gates, type=workflow lists the workflow human-gates; type defaults to tool. Each item carries a source discriminator and the fields relevant to that source. |
Marketplace installs: the target project (#1549)
Section titled “Marketplace installs: the target project (#1549)”A marketplace_installs entry of the desired-state document names the project its
workflow members land in with project_key (the same key a workflows or
workflow_triggers entry uses). The browser install carries the same choice as
resource_mappings.target_project_id, and the install preview reports the resolved
project as target_project. Without a target the install uses the workspace’s only
project, or creates Marketplace Installs when there is none; a workspace with
several projects is refused by name (TargetProjectRequired). The install records
its project, so an update places new workflows in the same project, and a request
naming another project is refused (TargetProjectInvalid). The full rule is in
docs/management-api.md.
An existing install moves only on an explicit relocate: true next to its
project_key: the workflows the install created (and their paused schedules) move
to that project of the same workspace and the install records it, in one audited
transaction (marketplace_install_relocated). It is refused with 409, naming
every reason, when an owned workflow lost the listing’s catalog mark, has run, or
has an enabled trigger, an active or project-credential schedule or a project
automation arm; or when the target holds a workflow of the same name. The App
stays workspace-wide; only the workflows move. A repeat changes nothing.