Create a project and its services from a Docker Compose plan (from POST /compose/preview, edited if you like), and deploy them in order.
API key access: full.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonCreate a project and its services from a Docker Compose plan (from POST /compose/preview, edited if you like), and deploy them in order.
API key access: full.
op*"importCompose""importCompose"teamId*stringclusterId?|Where they run. The team's default cluster when omitted.
projectId?|Add them to this project instead of creating one.
plan*A whole import: what will be created, and what was left out.
Done. Always ok: true, and some operations add more, such as a new API key or a join command. A warning comes with a change that went through but won't fully take effect yet, such as more replicas than the servers have room for.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/ops' \
-H 'Content-Type: application/json' \
-d '{
"op": "importCompose",
"plan": {
"project": {
"name": "Shop",
"namespace": "shop"
},
"services": [],
"warnings": []
},
"teamId": "team_8kq2x7ad"
}'{}