Skip to content
NebulaCtrldocs
HTTP APIEndpoints

Templates

Built-in, community and saved templates, and how to install or export them. Each operation lists its method and path, parameters, request body, responses and an example call.

GET/api/v1/community-templates

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

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/community-templates"
{  "$schema": "https://example.com/CommunityTemplatesOutputBody.json",  "enabled": true,  "error": "string",  "fetchedAt": "2019-08-24T14:15:22Z",  "items": [    {      "category": "string",      "description": "string",      "id": "string",      "links": {        "docs": "string",        "source": "string",        "website": "string"      },      "name": "string",      "origin": "builtin",      "services": [        {          "engine": "string",          "image": "string",          "kind": "image",          "memory": "string",          "name": "string",          "port": 0,          "runAsRoot": true,          "volumes": 0        }      ],      "slug": "string",      "sourceUrl": "string",      "tags": [        "string"      ],      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "repositoryUrl": "string"}
POST/api/v1/community-templates/refresh

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

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/community-templates/refresh"
{  "$schema": "https://example.com/CommunityTemplatesOutputBody.json",  "enabled": true,  "error": "string",  "fetchedAt": "2019-08-24T14:15:22Z",  "items": [    {      "category": "string",      "description": "string",      "id": "string",      "links": {        "docs": "string",        "source": "string",        "website": "string"      },      "name": "string",      "origin": "builtin",      "services": [        {          "engine": "string",          "image": "string",          "kind": "image",          "memory": "string",          "name": "string",          "port": 0,          "runAsRoot": true,          "volumes": 0        }      ],      "slug": "string",      "sourceUrl": "string",      "tags": [        "string"      ],      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "repositoryUrl": "string"}
GET/api/v1/community-templates/{slug}

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

slug*string

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/community-templates/string"
{  "$schema": "https://example.com/TemplateDetailBody.json",  "category": "string",  "createdAt": "2019-08-24T14:15:22Z",  "description": "string",  "generatedSecrets": [    "string"  ],  "id": "string",  "inputs": [    {      "default": "string",      "description": "string",      "key": "string",      "label": "string",      "options": [        "string"      ],      "required": true,      "secret": true    }  ],  "links": {    "docs": "string",    "source": "string",    "website": "string"  },  "name": "string",  "origin": "builtin",  "readme": "string",  "savedBy": "string",  "services": [    {      "engine": "string",      "image": "string",      "kind": "image",      "memory": "string",      "name": "string",      "port": 0,      "runAsRoot": true,      "volumes": 0    }  ],  "slug": "string",  "source": "string",  "sourceUrl": "string",  "tags": [    "string"  ],  "updatedAt": "2019-08-24T14:15:22Z"}
GET/api/v1/projects/{id}/template

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

Query Parameters

environmentId*string

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/projects/string/template?environmentId=string"
{  "$schema": "https://example.com/ExportProjectTemplateOutputBody.json",  "services": [    {      "kind": "image",      "name": "string",      "note": "string",      "skipped": true,      "warnings": [        "string"      ]    }  ],  "source": "string",  "warnings": [    "string"  ]}
GET/api/v1/template-catalog

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

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/template-catalog"
{  "$schema": "https://example.com/TemplateCatalogOutputBody.json",  "items": [    {      "category": "string",      "description": "string",      "id": "string",      "links": {        "docs": "string",        "source": "string",        "website": "string"      },      "name": "string",      "origin": "builtin",      "services": [        {          "engine": "string",          "image": "string",          "kind": "image",          "memory": "string",          "name": "string",          "port": 0,          "runAsRoot": true,          "volumes": 0        }      ],      "slug": "string",      "sourceUrl": "string",      "tags": [        "string"      ],      "updatedAt": "2019-08-24T14:15:22Z"    }  ]}
GET/api/v1/template-catalog/{slug}

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

slug*string

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/template-catalog/string"
{  "$schema": "https://example.com/TemplateDetailBody.json",  "category": "string",  "createdAt": "2019-08-24T14:15:22Z",  "description": "string",  "generatedSecrets": [    "string"  ],  "id": "string",  "inputs": [    {      "default": "string",      "description": "string",      "key": "string",      "label": "string",      "options": [        "string"      ],      "required": true,      "secret": true    }  ],  "links": {    "docs": "string",    "source": "string",    "website": "string"  },  "name": "string",  "origin": "builtin",  "readme": "string",  "savedBy": "string",  "services": [    {      "engine": "string",      "image": "string",      "kind": "image",      "memory": "string",      "name": "string",      "port": 0,      "runAsRoot": true,      "volumes": 0    }  ],  "slug": "string",  "source": "string",  "sourceUrl": "string",  "tags": [    "string"  ],  "updatedAt": "2019-08-24T14:15:22Z"}
GET/api/v1/templates

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

Query Parameters

cursor?string

Opaque cursor from a previous response's nextCursor. Omit for the first page.

limit?integer

How many items to return.

Formatint64
Range1 <= value <= 200
Default50

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/templates"
{  "$schema": "https://example.com/TemplatesPageOutputBody.json",  "items": [    {      "category": "string",      "description": "string",      "id": "string",      "links": {        "docs": "string",        "source": "string",        "website": "string"      },      "name": "string",      "origin": "builtin",      "services": [        {          "engine": "string",          "image": "string",          "kind": "image",          "memory": "string",          "name": "string",          "port": 0,          "runAsRoot": true,          "volumes": 0        }      ],      "slug": "string",      "sourceUrl": "string",      "tags": [        "string"      ],      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}
POST/api/v1/templates

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/templates" \  -H "Content-Type: application/json" \  -d '{}'
{  "$schema": "https://example.com/TemplateDetailBody.json",  "category": "string",  "createdAt": "2019-08-24T14:15:22Z",  "description": "string",  "generatedSecrets": [    "string"  ],  "id": "string",  "inputs": [    {      "default": "string",      "description": "string",      "key": "string",      "label": "string",      "options": [        "string"      ],      "required": true,      "secret": true    }  ],  "links": {    "docs": "string",    "source": "string",    "website": "string"  },  "name": "string",  "origin": "builtin",  "readme": "string",  "savedBy": "string",  "services": [    {      "engine": "string",      "image": "string",      "kind": "image",      "memory": "string",      "name": "string",      "port": 0,      "runAsRoot": true,      "volumes": 0    }  ],  "slug": "string",  "source": "string",  "sourceUrl": "string",  "tags": [    "string"  ],  "updatedAt": "2019-08-24T14:15:22Z"}
POST/api/v1/templates/install

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/templates/install" \  -H "Content-Type: application/json" \  -d '{    "template": {}  }'
{  "$schema": "https://example.com/InstallTemplateOutputBody.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    }  },  "domains": [    {      "domainId": "string",      "error": "string",      "hostname": "string",      "process": "string",      "service": "string"    }  ],  "environmentId": "string",  "projectId": "string",  "projectSlug": "string",  "services": [    {      "kind": "image",      "name": "string",      "serviceId": "string",      "slug": "string"    }  ]}
POST/api/v1/templates/preview

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/templates/preview" \  -H "Content-Type: application/json" \  -d '{}'
{  "$schema": "https://example.com/PreviewTemplateOutputBody.json",  "problems": [    {      "line": 0,      "message": "string",      "path": "string"    }  ],  "source": "string",  "template": {    "$schema": "https://example.com/TemplateDetailBody.json",    "category": "string",    "createdAt": "2019-08-24T14:15:22Z",    "description": "string",    "generatedSecrets": [      "string"    ],    "id": "string",    "inputs": [      {        "default": "string",        "description": "string",        "key": "string",        "label": "string",        "options": [          "string"        ],        "required": true,        "secret": true      }    ],    "links": {      "docs": "string",      "source": "string",      "website": "string"    },    "name": "string",    "origin": "builtin",    "readme": "string",    "savedBy": "string",    "services": [      {        "engine": "string",        "image": "string",        "kind": "image",        "memory": "string",        "name": "string",        "port": 0,        "runAsRoot": true,        "volumes": 0      }    ],    "slug": "string",    "source": "string",    "sourceUrl": "string",    "tags": [      "string"    ],    "updatedAt": "2019-08-24T14:15:22Z"  }}
GET/api/v1/templates/{id}

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

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/templates/string"
{  "$schema": "https://example.com/TemplateDetailBody.json",  "category": "string",  "createdAt": "2019-08-24T14:15:22Z",  "description": "string",  "generatedSecrets": [    "string"  ],  "id": "string",  "inputs": [    {      "default": "string",      "description": "string",      "key": "string",      "label": "string",      "options": [        "string"      ],      "required": true,      "secret": true    }  ],  "links": {    "docs": "string",    "source": "string",    "website": "string"  },  "name": "string",  "origin": "builtin",  "readme": "string",  "savedBy": "string",  "services": [    {      "engine": "string",      "image": "string",      "kind": "image",      "memory": "string",      "name": "string",      "port": 0,      "runAsRoot": true,      "volumes": 0    }  ],  "slug": "string",  "source": "string",  "sourceUrl": "string",  "tags": [    "string"  ],  "updatedAt": "2019-08-24T14:15:22Z"}

Delete a saved template.

DELETE/api/v1/templates/{id}

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

Response Body

application/problem+json

curl -X DELETE "https://example.com/api/v1/templates/string"
Empty
PUT/api/v1/templates/{id}

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 PUT "https://example.com/api/v1/templates/string" \  -H "Content-Type: application/json" \  -d '{    "source": "string"  }'
{  "$schema": "https://example.com/TemplateDetailBody.json",  "category": "string",  "createdAt": "2019-08-24T14:15:22Z",  "description": "string",  "generatedSecrets": [    "string"  ],  "id": "string",  "inputs": [    {      "default": "string",      "description": "string",      "key": "string",      "label": "string",      "options": [        "string"      ],      "required": true,      "secret": true    }  ],  "links": {    "docs": "string",    "source": "string",    "website": "string"  },  "name": "string",  "origin": "builtin",  "readme": "string",  "savedBy": "string",  "services": [    {      "engine": "string",      "image": "string",      "kind": "image",      "memory": "string",      "name": "string",      "port": 0,      "runAsRoot": true,      "volumes": 0    }  ],  "slug": "string",  "source": "string",  "sourceUrl": "string",  "tags": [    "string"  ],  "updatedAt": "2019-08-24T14:15:22Z"}
POST/api/v1/templates/{id}/refresh

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

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/templates/string/refresh"
{  "$schema": "https://example.com/TemplateDetailBody.json",  "category": "string",  "createdAt": "2019-08-24T14:15:22Z",  "description": "string",  "generatedSecrets": [    "string"  ],  "id": "string",  "inputs": [    {      "default": "string",      "description": "string",      "key": "string",      "label": "string",      "options": [        "string"      ],      "required": true,      "secret": true    }  ],  "links": {    "docs": "string",    "source": "string",    "website": "string"  },  "name": "string",  "origin": "builtin",  "readme": "string",  "savedBy": "string",  "services": [    {      "engine": "string",      "image": "string",      "kind": "image",      "memory": "string",      "name": "string",      "port": 0,      "runAsRoot": true,      "volumes": 0    }  ],  "slug": "string",  "source": "string",  "sourceUrl": "string",  "tags": [    "string"  ],  "updatedAt": "2019-08-24T14:15:22Z"}