Deploy a new app from a container image.
const url = 'https://example.com/api/v1/projects/example/environments/example/apps';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"api","image":"ghcr.io/acme/api:1.4.2","port":8080,"command":["example"],"replicas":1,"max_replicas":1,"size":"small","env":[{"name":"LOG_LEVEL","value":"example","secret":{"name":"example","key":"example"}}],"domains":["example"],"health_check_path":"/healthz","schedule":"0 3 * * *","time_zone":"Europe/Berlin","protocol":"http","volumes":[{"name":"data","mount_path":"/data","size":"5Gi"}],"fs_group":1000}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/projects/example/environments/example/apps \ --header 'Content-Type: application/json' \ --data '{ "name": "api", "image": "ghcr.io/acme/api:1.4.2", "port": 8080, "command": [ "example" ], "replicas": 1, "max_replicas": 1, "size": "small", "env": [ { "name": "LOG_LEVEL", "value": "example", "secret": { "name": "example", "key": "example" } } ], "domains": [ "example" ], "health_check_path": "/healthz", "schedule": "0 3 * * *", "time_zone": "Europe/Berlin", "protocol": "http", "volumes": [ { "name": "data", "mount_path": "/data", "size": "5Gi" } ], "fs_group": 1000 }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project name
Environment short name
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
apiExample
ghcr.io/acme/api:1.4.2Port the process listens on; omit for workers and scheduled jobs.
Example
8080CPU autoscaling up to this many replicas when greater than replicas.
Size preset: nano, small, medium, large (or custom).
Example
smallExample
/healthzCron expression: the app runs as a scheduled job (no port).
Example
0 3 * * *IANA time zone for schedule (default UTC).
Example
Europe/BerlinPersistent volume (kept when the app is deleted, unless requested).
object
Example
dataExample
/dataCapacity such as 5Gi. Can grow, never shrink.
Example
5GiGroup id owning the volumes, for images running as a non-root user.
Example
1000Responses
Section titled “Responses”object
Environment short name.
Available, Progressing, RolloutFailed, Scheduled, AwaitingBuild, …
object
Cron expression of scheduled processes.
http or tcp.
Persistent volume (kept when the app is deleted, unless requested).
object
Capacity such as 5Gi. Can grow, never shrink.
Example
{ "env": [ { "name": "LOG_LEVEL" } ], "volumes": [ { "name": "data", "mount_path": "/data", "size": "5Gi" } ]}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}