Accept a deployment of this app.
const url = 'https://example.com/api/v1/projects/example/environments/example/apps/example/deployments';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"image":"ghcr.io/acme/api@sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","release":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","config":"example","reason":"deploy","expected_generation":1}'};
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/example/deployments \ --header 'Content-Type: application/json' \ --data '{ "image": "ghcr.io/acme/api@sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "release": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "config": "example", "reason": "deploy", "expected_generation": 1 }'The release (from image, or an existing release), the configuration
revision and the run are written in one transaction with the audit record
and the message to the executors; then the call answers 202 with the
run’s Location. Replaying the request with the same Idempotency-Key
returns the first run.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project name
Environment short name
App name
Header Parameters
Section titled “Header Parameters”Replays of the same request return the first run
Request Bodyrequired
Section titled “Request Bodyrequired”object
Image by digest: registry/repository@sha256:…. Give either image
or release.
Example
ghcr.io/acme/api@sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefAn existing release of this app: a rollback or a redeploy.
The app configuration: the app spec without its image. Omitted, the app’s latest configuration is used.
Why a run exists.
The target generation the caller last saw. A deploy never silently
replaces a newer one: a stale value is refused with 409.
Responses
Section titled “Responses”Accepted: poll the Location
A deployment run and where it stands.
object
The target generation this run owns.
planned, awaitingApproval, pendingDelivery, acceptedByCluster,
applying, succeeded, failed, superseded, cancelled, …
Distinct approvals the environment’s policy requires before delivery.
When a run waiting for approval is cancelled (Unix milliseconds).
The hash approvers confirm (hex), when approvals are required.
What admission could not check, e.g. that the pods will be scheduled.
Examplegenerated
{ "run": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "operation": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "generation": 1, "phase": "example", "approvals_required": 1, "approval_expires_at": 1, "plan_hash": "example", "warnings": [ "example" ]}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"}A stale expected generation, or an Idempotency-Key used for another request
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"}