Skip to content

Plan a promotion

POST
/content/deployment/v1/promotions/plan
curl --request POST \
--url https://api.ebitex.io/content/deployment/v1/promotions/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "kind": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Shows what promoting one item from the key’s source environment to its target would do, and changes nothing. Send the item as kind and id: a component, node, contract, template, adapter or stream.

The response lists every item the promotion would carry, each with a state: new (the target has no copy), update (the target copy is as the last promotion left it) or diverged (the target copy has changed since, or was never promoted). Contracts, templates and similar dependencies come along automatically and are marked implicit.

The source and target are the ones the key was created for. The request cannot name either: a targetEnvironmentId in the body is ignored.

A key acts in one realm. Each item carries the realmId that owns it. When the promotion needs items that a realm above the key’s own owns and the target lacks or has behind, they are listed under blockedByAncestorRealms (a realmId and its items, each with a kind, id, name and a reason of missing, behind or versionMismatch). A deployment key cannot promote into an ancestor realm: promote those items first with a key bound to that realm.

Key: content.deployment.plan

Media typeapplication/json
object
kind
required
string
id
required
string format: uuid
Examplegenerated
{
"kind": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

{ "targetEnvironmentId", "items": [ { "kind", "id", "name", "state", "implicit", "include", "pinnedVersionNumber", "targetHeadVersionNumber", "realmId" } ], "blockers": [ … ], "blockedByAncestorRealms": [ … ] }. A non-empty blockers means the promotion cannot run until they are resolved.

not_a_promotion_target: the key’s edge is no longer in the organization’s topology.

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.

scope_denied: the key does not hold content.deployment.plan. tier_required: the organization’s plan is below Pro.

scope_denied: the key lacks this route’s scope. origin_denied or ip_denied: a browser-safe key was used from an origin or address outside its restrictions. app_not_available: Content is not enabled for the organization.

Quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.