API

AppDeploymentRollback

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/hosting/apps/{app_id}/deployment_rollbacks create Existing idempotent deployment rollback
POST /api/v1/hosting/apps/{app_id}/deployment_rollbacks/plan create Deployment rollback plan

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

created, err := client.AppDeploymentRollback(nil).Create(map[string]any{"app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local created, err = client:AppDeploymentRollback():create({ app_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$created = $client->AppDeploymentRollback()->create(["app_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

created = client.AppDeploymentRollback().create({ "app_id": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

created = client.AppDeploymentRollback.create({ "app_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const created = await client.AppDeploymentRollback().create({ app_id: "example" })

Fields

Field Type Required Description
app_environment_id string No App Environment Id
app_id string Yes App Id
app_service_id string No App Service Id
blockers array Yes Blockers
candidate_releases array Yes Candidate Releases
confirmation_text string Yes Confirmation Text
current_deployment any Yes Current Deployment
current_release any Yes Current Release
deployment any Yes Deployment
desired_state any Yes Desired State
environment any Yes Environment
execution_allowed boolean Yes Execution Allowed
force boolean Yes Force
idempotency_key string No Idempotency Key
idempotent_reuse boolean Yes Idempotent Reuse
location any Yes Location
operation any Yes Operation
reason one,string,null Yes Reason
rollback_release any Yes Rollback Release
rollout any Yes Rollout
service any Yes Service
target_artifact_locator one,string,null Yes Target Artifact Locator
target_release any Yes Target Release
to string No To
warnings array Yes Warnings

create

POST /api/v1/hosting/apps/{app_id}/deployment_rollbacks

Operation ID: api_v1_app_deployment_rollbacks.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes

Request body

application/json

Property Type Required Description
app_environment_id string No
app_service_id string No
deployment string No
environment string No
force boolean No
idempotency_key string No
reason string No
service string No
to string No

Responses

200: Existing idempotent deployment rollback

application/json

The response is object and object.

201: Deployment rollback created

application/json

The response is object and object.

401: Unauthorized
403: Forbidden
404: Not found
409: Idempotency key already names a different deployment

application/json

Property Type Required Description
error string Yes
422: Deployment request failed validation

application/json

Property Type Required Description
details array of string No
error string Yes
502: Bad gateway

POST /api/v1/hosting/apps/{app_id}/deployment_rollbacks/plan

Operation ID: api_v1_app_deployment_rollbacks_plan.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes

Request body

application/json

Property Type Required Description
app_environment_id string No
app_service_id string No
deployment string No
environment string No
force boolean No
idempotency_key string No
reason string No
service string No
to string No

Responses

200: Deployment rollback plan

application/json

Property Type Required Description
app_id string Yes
blockers array of string Yes
candidate_releases array of object Yes
candidate_releases[].app_deployment_id string Yes
candidate_releases[].commit_sha string Yes
candidate_releases[].created_at string (date-time) Yes
candidate_releases[].id string Yes
candidate_releases[].release_kind enum: deployment, rollback, hotfix Yes
candidate_releases[].rollback_target_release_id string Yes
candidate_releases[].slug string Yes
candidate_releases[].source_ref string Yes
candidate_releases[].status enum: draft, ready, deploying, active, failed, rolled_back Yes
candidate_releases[].version string Yes
confirmation_text string Yes
current_deployment object or null Yes
current_release object or null Yes
environment object or null Yes
execution_allowed boolean Yes
force boolean Yes
location object or null Yes
reason string Yes
service object or null Yes
target_artifact_locator string Yes
target_release object or null Yes
warnings array of string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway