Reject a deployment waiting for approval; it is cancelled.
const url = 'https://example.com/api/v1/projects/example/environments/example/apps/example/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reject';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"planHash":"example","comment":"example"}'};
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/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reject \ --header 'Content-Type: application/json' \ --data '{ "planHash": "example", "comment": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project name
Environment short name
App name
Deployment run id
Request Bodyrequired
Section titled “Request Bodyrequired”object
The plan hash shown with the deployment (hex).
Why, for the record; at most 1024 characters.
Examplegenerated
{ "planHash": "example", "comment": "example"}Responses
Section titled “Responses”object
Email of whoever asked for the deployment.
Distinct approvals needed; 0 when the run needs none.
When the run is cancelled unless approved (Unix milliseconds).
What an approver confirms: send it back with the decision.
Whether the caller may decide on this run now.
object
Email of whoever decided.
approved or rejected.
Examplegenerated
{ "run": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "phase": "example", "requestedBy": "example", "required": 1, "approved": 1, "expiresAt": 1, "planHash": "example", "canDecide": true, "decisions": [ { "approver": "example", "decision": "example", "comment": "example", "decidedAt": 1 } ]}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"}