Skip to content

Compose API

2 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes

POST/environments/{environmentId}/compose-imports

Import a Docker Compose project

Creates the services of a Compose project as staged changes: services, volumes, config files, variables, domains, published ports, links (deploy order) and a canvas group. The request must match a plan without blockers. With deploy: true the new services are deployed in dependency order (needs deployments:write); otherwise review them and deploy from the staged bar.

ParameterInTypeDescription
Idempotency-KeyheaderstringClient-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours.
environmentIdrequiredpathstring
Request body · application/json · required
ComposeImportRequest
  • ComposeChoicesrequired
  • deployboolean
  • modeenum: split | stack
  • serverIdstringrequired
  • ComposeSourcerequired
Response 201 · Created · application/json
ComposeImportResult
  • DeploymentView[] | nullrequired
  • groupIdstringrequired
  • namestringrequired
  • ComposeRewrite[] | nullrequired
  • ServiceView[] | nullrequired
  • warningsstring[] | nullrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/environments/{environmentId}/compose-imports/plan

Review a Docker Compose import

Reads a docker-compose.yml (pasted, or from a git repository) and returns, for every Compose service, how it would be imported: source, ports and domains, variables (secrets are flagged and never returned), volumes, files, the rewritten references, what is not supported, and whether an official database image can become a managed database. choices change the defaults (include a service, switch to a managed database, publish a port, ...); send the same body again to see the effect. Nothing is written. Reading from a git repository needs projects:write.

ParameterInTypeDescription
environmentIdrequiredpathstring
Request body · application/json · required
ComposePlanRequest
  • ComposeChoicesrequired
  • modeenum: split | stack
  • serverIdstring
  • ComposeSourcerequired
Response 200 · OK · application/json
ComposePlan
  • blockersstring[] | nullrequired
  • ComposeCheck[] | nullrequired
  • commitstring
  • installablebooleanrequired
  • missingstring[] | nullrequired
  • modeenum: split | stackrequired
  • namestringrequired
  • ComposeNeededFile[] | nullrequired
  • ComposePlanNetwork[] | nullrequired
  • ComposeNote[] | nullrequired
    Project-level remarks
  • ComposeRewrite[] | nullrequired
  • ComposePlanService[] | nullrequired
  • sourceKindenum: paste | reporequired
  • ComposeStackPlan
  • warningsstring[] | nullrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.