Skip to content
NebulaCtrldocs
HTTP APIEndpoints

Compose import

Preview and import the services of a repository's Compose files. Each operation lists its method and path, parameters, request body, responses and an example call.

POST/api/v1/projects/{id}/compose-import

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/projects/string/compose-import" \  -H "Content-Type: application/json" \  -d '{    "branch": "string",    "commitSha": "string",    "environmentId": "string"  }'
{  "$schema": "https://example.com/ImportComposeOutputBody.json",  "changeSet": {    "$schema": "https://example.com/ViewBody.json",    "changeSet": {      "appliedAt": "2019-08-24T14:15:22Z",      "approvalId": "string",      "createdAt": "2019-08-24T14:15:22Z",      "downtimeAccepted": true,      "environmentId": "string",      "id": "string",      "message": "string",      "reason": "string",      "source": "console",      "sourceCommit": "string",      "state": "draft"    },    "environmentId": "string",    "items": [      {        "createdAt": "2019-08-24T14:15:22Z",        "from": "string",        "id": "string",        "key": "string",        "kind": "string",        "label": "string",        "managed": true,        "processId": "string",        "secret": true,        "serviceId": "string",        "serviceSlug": "string",        "to": "string",        "toEmpty": true,        "volumeId": "string"      }    ],    "projectConfig": {      "changeSet": {        "appliedAt": "2019-08-24T14:15:22Z",        "approvalId": "string",        "createdAt": "2019-08-24T14:15:22Z",        "downtimeAccepted": true,        "environmentId": "string",        "id": "string",        "message": "string",        "reason": "string",        "source": "console",        "sourceCommit": "string",        "state": "draft"      },      "items": [        {          "createdAt": "2019-08-24T14:15:22Z",          "from": "string",          "id": "string",          "key": "string",          "kind": "string",          "label": "string",          "managed": true,          "processId": "string",          "secret": true,          "serviceId": "string",          "serviceSlug": "string",          "to": "string",          "toEmpty": true,          "volumeId": "string"        }      ],      "summary": {        "affectedServiceIds": [          "string"        ],        "needsApproval": true,        "requiresDowntime": true      }    },    "summary": {      "affectedServiceIds": [        "string"      ],      "needsApproval": true,      "requiresDowntime": true    }  },  "needsInput": [    {      "key": "string",      "service": "string",      "serviceId": "string"    }  ],  "services": [    {      "composeName": "string",      "file": "string",      "name": "string",      "serviceId": "string",      "source": "git"    }  ]}
POST/api/v1/repository-config/detect-compose

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/repository-config/detect-compose" \  -H "Content-Type: application/json" \  -d '{    "branch": "string"  }'
{  "$schema": "https://example.com/DetectComposeOutputBody.json",  "message": "string",  "proposal": {    "commitSha": "string",    "files": [      {        "message": "string",        "path": "string",        "selected": true,        "status": "ok"      }    ],    "notes": [      {        "file": "string",        "message": "string",        "path": "string",        "severity": "blocking"      }    ],    "services": [      {        "blocked": true,        "build": {          "context": "string",          "dockerfile": "string",          "target": "string"        },        "composeName": "string",        "database": {          "engine": "postgres",          "version": "string"        },        "databaseChoice": true,        "decisions": [          {            "accepted": true,            "id": "string",            "kind": "variable-names",            "message": "string"          }        ],        "file": "string",        "files": [          {            "path": "string",            "variable": "string"          }        ],        "image": "string",        "imageInit": true,        "imageUser": "string",        "included": true,        "key": "string",        "name": "string",        "notes": [          {            "file": "string",            "message": "string",            "path": "string",            "severity": "blocking"          }        ],        "process": {          "args": [            "string"          ],          "command": [            "string"          ],          "cpu": "string",          "kind": "http",          "memory": "string",          "port": 0,          "replicas": 0,          "runAsUser": 0        },        "releaseCommand": [          "string"        ],        "releaseCommandFrom": "string",        "source": "git",        "userDecision": "root",        "variables": [          {            "acceptedEmpty": true,            "change": "database-url",            "generateOffered": true,            "hint": "string",            "key": "string",            "needsInput": true,            "origin": "compose",            "original": "string",            "provided": true,            "secret": true,            "target": "string",            "value": "string"          }        ],        "volumes": [          {            "mountPath": "string",            "name": "string",            "size": "string"          }        ]      }    ],    "values": [      {        "current": "string",        "default": "string",        "fromEnvFile": true,        "generateOffered": true,        "generated": true,        "message": "string",        "name": "string",        "required": true,        "secret": true,        "structural": true      }    ]  },  "status": "found"}