opsdocsConsole

Ops platform / HTTP API

Resources

Services, databases, buckets, jobs, domains and secret groups: list, create, change and remove them, and run the actions each kind offers.

Updated 13 Oct 2026View as Markdown

Services, databases, buckets, jobs, domains and secret groups: list, create, change and remove them, and run the actions each kind offers.

GET /api/v1/projects/{slug}/resources

Every resource of one environment (production unless you name another), with the project wide ones, by type and then name.

ParameterInTypeAbout
slugpathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
200Donearray of ResourceResponse
404No such project or environment

POST /api/v1/projects/{slug}/resources/bucket/{name}/check

Count the bucket now and answer it with the fresh status. A bucket that does not answer shows as pending, not as an error.

ParameterInTypeAbout
slugpathstring
namepathstring
StatusMeansBody
200DoneResourceResponse
404No such project or bucket

GET /api/v1/projects/{slug}/resources/database/{name}/restore-runbook

The steps that bring this database back to a point in time, written out for this database.

ParameterInTypeAbout
slugpathstring
namepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
200DoneRestoreRunbookResponse
404No such project, environment or database

POST /api/v1/projects/{slug}/resources/database/{name}/rotate-password

Rotate the project's Postgres role password and rewrite every DSN it appears in.

ParameterInTypeAbout
slugpathstring
namepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
200DoneResourceResponse
404No such project, environment or database
409The plane refused the rotation, or the database is adopted
503Secrets store sealed

POST /api/v1/projects/{slug}/resources/job/{name}/run

Queue a manual run. One live run per job, so a second press is a 409 rather than a second container.

ParameterInTypeAbout
slugpathstring
namepathstring
environment (optional)querystring or null
limit (optional)queryinteger or null
StatusMeansBody
202Accepted, and carried on in the backgroundJobRunResponse
404No such project, environment or job
409A run is already queued or running

GET /api/v1/projects/{slug}/resources/job/{name}/runs

A job's runs, newest first.

ParameterInTypeAbout
slugpathstring
namepathstring
environment (optional)querystring or null
limit (optional)queryinteger or null
StatusMeansBody
200Donearray of JobRunResponse
404No such project, environment or job

GET /api/v1/projects/{slug}/resources/job/{name}/runs/{id}/log

One run's log lines after after, and whether to poll again.

ParameterInTypeAbout
slugpathstring
namepathstring
idpathinteger
environment (optional)querystring or null
after (optional)queryinteger or null
limit (optional)queryinteger or null
StatusMeansBody
200DoneJobLogResponse
404No such project, environment, job or run

POST /api/v1/projects/{slug}/resources/secret-group/{name}/rotate

Issue the group's values again and restart every service of the environment that uses the group, so they pick the new values up.

ParameterInTypeAbout
slugpathstring
namepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
200DoneRotateGroupResponse
404No such project, environment or group
409No variables to render
503Secrets store sealed

GET /api/v1/projects/{slug}/resources/secret-group/{name}/variables

Text values come back in the clear (one audited export); secrets never do.

ParameterInTypeAbout
slugpathstring
namepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
200Donearray of VariableResponse
404No such project, environment or group
503Secrets store sealed

PUT /api/v1/projects/{slug}/resources/secret-group/{name}/variables/{key}

Set or rotate one value. A name the group does not declare is appended to the spec (names and kinds only) once the value is stored.

ParameterInTypeAbout
slugpathstring
namepathstring
keypathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).

Body: SetVariableRequest

StatusMeansBody
200DoneVariableResponse
404No such project, environment or group
422Name not env var shaped, or kind not secret or text
503Secrets store sealed

DELETE /api/v1/projects/{slug}/resources/secret-group/{name}/variables/{key}

Remove one variable from the store and from the group's spec.

ParameterInTypeAbout
slugpathstring
namepathstring
keypathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
204Done, with no body
404No such group, or no such variable
503Secrets store sealed

GET /api/v1/projects/{slug}/resources/secret-group/{name}/versions

The group's rendered history, newest first.

ParameterInTypeAbout
slugpathstring
namepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
200Donearray of RenderedVersion
404No such project, environment or group

GET /api/v1/projects/{slug}/resources/{type}

The resources of one type in one environment, by name.

ParameterInTypeAbout
slugpathstring
typepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
200Donearray of ResourceResponse
404No such project or environment
422Unknown resource type

POST /api/v1/projects/{slug}/resources/{type}

A new resource of one type; the spec is checked against the type's schema.

ParameterInTypeAbout
slugpathstring
typepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).

Body: CreateResourceRequest

StatusMeansBody
201CreatedResourceResponse
404No such project or environment
409Name exists, or project archived
422Unknown type, bad name, or spec fails the schema

GET /api/v1/projects/{slug}/resources/{type}/{name}

One resource with its spec and stored status.

ParameterInTypeAbout
slugpathstring
typepathstring
namepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
200DoneResourceResponse
404No such project, environment or resource
422Unknown resource type

PUT /api/v1/projects/{slug}/resources/{type}/{name}

Create or replace one resource: 201 when it did not exist, 200 when its spec was replaced (the version bumps either way it is written).

ParameterInTypeAbout
slugpathstring
typepathstring
namepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).

Body: SetResourceRequest

StatusMeansBody
200ReplacedResourceResponse
201CreatedResourceResponse
404No such project or environment
409It conflicts with what is there
422Unknown type, bad name, or spec fails the schema

DELETE /api/v1/projects/{slug}/resources/{type}/{name}

Remove one resource. Ops refuses when removing it would leave something running that nothing manages.

ParameterInTypeAbout
slugpathstring
typepathstring
namepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
204Done, with no body
404No such project, environment or resource
409Project archived, or the type refused the destroy
422Unknown type or bad name

POST /api/v1/projects/{slug}/resources/{type}/{name}/observe

Look at the resource now and answer it with its fresh status.

ParameterInTypeAbout
slugpathstring
typepathstring
namepathstring
environment (optional)querystring or null
kind (optional)querystring or null
confirm (optional)querystring or nullTyped confirmation on a delete, read by the types that refuse to destroy without one (the Database wants its own name).
StatusMeansBody
200DoneResourceResponse
404No such project, environment or resource
409Project archived
422Unknown type or bad name
503Not available right now

GET /api/v1/projects/{slug}/secrets

The project's managed secrets' metadata, never the values.

ParameterInTypeAbout
slugpathstring
StatusMeansBody
200Donearray of SecretMetaResponse

GET /api/v1/projects/{slug}/secrets/{service}/env

The service's secrets rendered as a dotenv document (text/plain). This is the only value egress; the export is audited. Deploy usage: curl … > sample-backend.env && docker secret create sample-backend.env -.

ParameterInTypeAbout
slugpathstring
servicepathstring
StatusMeansBody
200dotenv documenttext/plain bytes
404Service has no secrets

PUT /api/v1/projects/{slug}/secrets/{service}/{name}

Create or rotate one secret for a deploy unit (e.g. sample-backend / S3_SECRET_ACCESS_KEY).

ParameterInTypeAbout
slugpathstring
servicepathstring
namepathstring

Body: SetSecretRequest

StatusMeansBody
204Done, with no body
404The unit is another project's
422Name/service not env-var shaped

DELETE /api/v1/projects/{slug}/secrets/{service}/{name}

Remove one secret.

ParameterInTypeAbout
slugpathstring
servicepathstring
namepathstring
StatusMeansBody
204Done, with no body
404No such secret

Types

ResourceResponse

FieldTypeAbout
created_atstring
environment (optional)string or nullNull for a project level type (Bucket).
idstring (uuid)
namestring
projectstring
specany
statusResourceStatusThe stored status; Pending with summary "null" until first observed.
typestring
updated_atstring
updated_bystring
versionintegerBumps on every put, an unchanged spec included.

RestoreRunbookResponse

The steps that bring one database back, rendered for it.

FieldTypeAbout
backupstringPITR via the plane stanza or null (OPS_DB_PLANE_PITR).
databasestring
stanzastring
stepsarray of stringOne shell line per step.
textstringThe same lines as one block, for the copy button.

JobRunResponse

FieldTypeAbout
duration_secs (optional)integer or nullWhole seconds between started_at and finished_at; null while running.
environmentstring
error (optional)string or null
exit_code (optional)integer or null
finished_at (optional)string or null
idinteger
jobstring
linesinteger
queued_atstring
requested_bystringscheduler or the operator email.
started_at (optional)string or null
statusstringqueued, running, succeeded or failed.
triggerstringschedule or manual.

JobLogResponse

FieldTypeAbout
linesarray of JobLogLine
livebooleanThe run is queued or in flight: poll again.
nextintegerPass as after for the next page: the last sequence returned, or the after given when there was nothing new.

RotateGroupResponse

FieldTypeAbout
reason (optional)string or null
rolledarray of string
secret (optional)string or nullsample-api.env.v4; null when pending.
skippedarray of SkippedServiceServices left alone and why.
statestring
version (optional)integer or null

VariableResponse

FieldTypeAbout
has_valuebooleanTrue when the store holds a value.
kindstringsecret or text.
namestring
pendingbooleanThe value moved after the newest render.
updated_at (optional)string or null
value (optional)string or nullNull for a secret, the value for a text variable, null when no value is stored yet.
versionintegerStore version; 0 when no value yet.

SetVariableRequest

FieldTypeAbout
kind (optional)string or nullsecret (default) or text; only read when the variable is new to the group, since changing a stored secret into a readable text must be a deliberate spec edit.
valuestringSecretString (#18); wire shape a JSON string.

RenderedVersion

FieldTypeAbout
actorstring
currentbooleanThe version the services of the group are mounting now.
rendered_atstring
secretstring
versioninteger

CreateResourceRequest

FieldTypeAbout
namestring^[a-z0-9][a-z0-9-]{0,62}$.
specanyChecked against the type's schema (see /catalog).

SetResourceRequest

FieldTypeAbout
specany
version (optional)integer or null

SecretMetaResponse

FieldTypeAbout
namestring
servicestring
updated_atstring
versionintegerBumps on every rotation (PUT over an existing name).

SetSecretRequest

FieldTypeAbout
valuestring

ResourceStatus

FieldTypeAbout
detail (optional)anyType specific figures for the detail component; {} when there are none.
observed_atstring
stateStatusState
summarystring

JobLogLine

FieldTypeAbout
atstring
levelstringinfo, warn or error; a run's stderr arrives as warn.
linestring
seqinteger

SkippedService

FieldTypeAbout
reasonstring
servicestring

StatusState

One of: "ready" or "pending" or "error".