Skip to Content

Templates

Infrastructure-as-code templates for repeatable deployments. Templates define applications, databases, volumes, and their configuration as YAML. They can be created manually, generated from existing workloads, or converted from Docker Compose files.

Endpoints

MethodPathDescription
GET/api/v1/templatesList templates
POST/api/v1/templatesCreate template
GET/api/v1/templates/:idGet template
PUT/api/v1/templates/:idUpdate template
DELETE/api/v1/templates/:idDelete template

Import & Export

MethodPathDescription
GET/api/v1/templates/:id/exportExport as JSON
POST/api/v1/templates/importImport from JSON
POST/api/v1/templates/validateValidate template YAML
POST/api/v1/templates/convert-composeConvert Docker Compose to template
POST/api/v1/templates/from-workloadsCreate from existing workloads

Deploy

MethodPathDescription
POST/api/v1/templates/:id/instantiateDeploy a template

Instances

MethodPathDescription
GET/api/v1/template-instancesList template instances
GET/api/v1/template-instances/:idGet instance
DELETE/api/v1/template-instances/:idDelete instance

POST /api/v1/templates

{ "name": "full-stack", "display_name": "Full Stack App", "description": "Next.js app with PostgreSQL and Redis", "icon": "layers", "color": "#8B5CF6", "tags": ["nextjs", "postgres", "redis"], "content": "YAML template definition" }

POST /api/v1/templates/:id/instantiate

Deploy all resources defined in a template:

{ "project_id": "uuid", "environment_id": "uuid", "server_id": "uuid", "variables": { "APP_NAME": "my-app", "DB_PASSWORD": "securepassword", "DOMAIN": "app.example.com" } }

POST /api/v1/templates/convert-compose

Convert a Docker Compose file to a Launcher template:

{ "content": "version: '3'\nservices:\n web:\n image: nginx\n ports:\n - '80:80'" }
Last updated on