Check a promotion without making it
const url = 'https://example.com/v1/deployments/example/promotions/check';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"toProjectId":"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/v1/deployments/example/promotions/check \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "toProjectId": "example" }'Runs every check a promotion makes and writes nothing: what would move, the next environment, and each value with a problem in the target (where a promotion refuses with promotion-values-not-ready). Refused as the promotion is for every other check, the plan limits’ among them; at its plan or past it, the answer has planWarning. Needs read on the deployment’s project and admin on the target.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "toProjectId": "example"}Responses
Section titled “Responses”What a promotion would move, and the values not ready in the target.
object
Example
{ "moves": { "agents": [ { "carried": true } ], "flows": [ { "carried": true } ] }, "values": [ { "foundAt": "project" } ]}Malformed body (bad-input). Or signature-invalid: the deployment’s signature doesn’t verify over the fields it keeps.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No admin on the target project. Or key-project-mismatch: the API key or session is limited to a project, which a promotion’s check is refused as the promotion is. Or signer-not-trusted: the key that signed the build is no longer trusted. Or, as the promotion answers it, plan-limit-reached: this adds flows or agents to production past the most this runtime’s license key runs, so none of them is added; what runs keeps running. details has projectId (on a reinstate, when its version records one); over, each count over (flows first) with its limit (flows or agents), the number it adds (adding), and the key’s plan, most and inUse when they count this workspace alone; the first of them again at the top (details.limit, …); newIds, the flows and agents it adds; and next, where a larger plan is, when the runtime names one.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}deployment-not-found: no deployment with that id in this workspace, one in a project you don’t read, or one whose project is deleted.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}promotion-not-next-environment, deployment-superseded, or a suspension of the source or the target, as on the promotion.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The request body is over the API’s limit (request-too-large; details.maxBytes says how much).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Server error (unmapped domain code or framework crash).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The authorization store couldn’t be reached (authz-backend-unavailable), or the database was too busy for the authorization check (database-busy), so the request wasn’t run; Retry-After (whole seconds) says when to try again. Or tenant-state-unavailable (with Retry-After), on a runtime serving many workspaces: the workspace’s state couldn’t be read, so nothing was changed.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”See also
GET /v1/deployments/{deploymentId}: Fetch a signed deployment recordGET /v1/deployments/{deploymentId}/pack-env: Show where each name a deployment's pack declares is setPOST /v1/deployments/{deploymentId}/secrets: Sync secrets against a deploymentGET /v1/deployments/{deploymentId}/values: List the values a deployment needs in a project- Error code
authz-backend-unavailable - Error code
bad-input - Error code
database-busy - Error code
deployment-not-found - Error code
deployment-superseded - Error code
key-project-mismatch - Error code
plan-limit-reached - Error code
promotion-not-next-environment - Error code
rate-limit-exceeded - Error code
request-too-large - Error code
signature-invalid - Error code
signer-not-trusted - Error code
tenant-state-unavailable - Every error code