Templates

Create a template

Changed on

Creates every service of a template, the databases it needs, and, for a template going into a project, its shared variables and path routes. The request is checked in full, then runs in the background: poll GET /instantiations/{id}. Sending the same idempotency_key again returns the same instantiation.

post/templates/{slug}/instantiate

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/templates/{slug}/instantiate
  • Auth: HTTP bearer

Path parameters

slugstring required

Template slug

Request body

databasesobject

One choice per database type the template needs.

idempotency_keystring required

Chosen by the client. Sending the same key again returns the same instantiation instead of creating the template twice.

runtime_overridesobject

Runtime overrides for services that run a prebuilt image, by the template's service name.

service_namesobject

Names for the created services, by the template's service name.

Response

The instantiation already started with this idempotency key

created_atstring date-time required
errorstring nullable

Why it failed, when it did.

finished_atstring date-time nullable
group_idinteger nullable

The project the services go into, once known.

idinteger required
kindstring required

template or import.

namestring required
status'pending' | 'running' | 'succeeded' | 'failed' | 'interrupted' required
template_slugstring nullable
updated_atstring date-time required

Changes