Deploy a new app from a container image, or from a Git repository. A tag is resolved to a digest at its registry; a Git app deploys with its first build.
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","git":{"installationId":1,"connection":"example","repository":"acme/shop","branch":"main","strategy":"auto","context":"apps/web","dockerfile":"example","imageRepository":"registry.example.com/acme/shop"},"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", "git": { "installationId": 1, "connection": "example", "repository": "acme/shop", "branch": "main", "strategy": "auto", "context": "apps/web", "dockerfile": "example", "imageRepository": "registry.example.com/acme/shop" }, "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
apiThe image to run; give this or git.
Example
ghcr.io/acme/api:1.4.2Build the app from a Git repository instead (M3); its first build deploys it.
object
A GitHub App installation linked to this organization. Required
unless connection is given.
A Git connection of this organization (its id), instead of an installation: GitLab, Gitea or a GitHub token.
Example
acme/shopExample
mainBuild context inside the repository; the root when empty.
Example
apps/webDockerfile relative to the context; Dockerfile when unset.
Where builds push, without tag or digest.
Example
registry.example.com/acme/shopPort 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.
Whether the app can be reached through the gateway, apart from whether it runs (null while it has no route).
object
The gateway accepted the route and resolved its references; null until a gateway controller answered.
One hostname of an app.
object
auto (certificate from the cluster issuer), secret (the app’s own
certificate) or none (plain HTTP).
For auto hosts with a certificate of their own: whether it is issued.
Why delivery is paused, while it is: new runs wait.
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"}The image’s registry cannot be reached
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"}