Reference
View as MarkdownCompose API
2 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes
/environments/{environmentId}/compose-importsImport 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.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours. |
environmentIdrequired | path | string |
Request body · application/json · required
- ComposeChoicesrequired
- deployboolean
- modeenum: split | stack
- serverIdstringrequired
- ComposeSourcerequired
Response 201 · Created · application/json
- DeploymentView[] | nullrequired
- groupIdstringrequired
- namestringrequired
- ComposeRewrite[] | nullrequired
- ServiceView[] | nullrequired
- warningsstring[] | nullrequired
401Unauthorized403Forbidden404Not Found409Conflict422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/environments/{environmentId}/compose-imports/planReview 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.
| Parameter | In | Type | Description |
|---|---|---|---|
environmentIdrequired | path | string |
Request body · application/json · required
- ComposeChoicesrequired
- modeenum: split | stack
- serverIdstring
- ComposeSourcerequired
Response 200 · OK · application/json
- blockersstring[] | nullrequired
- ComposeCheck[] | nullrequired
- commitstring
- installablebooleanrequired
- missingstring[] | nullrequired
- modeenum: split | stackrequired
- namestringrequired
- ComposeNeededFile[] | nullrequired
- ComposePlanNetwork[] | nullrequired
- ComposeNote[] | nullrequiredProject-level remarks
- ComposeRewrite[] | nullrequired
- ComposePlanService[] | nullrequired
- sourceKindenum: paste | reporequired
- ComposeStackPlan
- warningsstring[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.