Plan a publish
const url = 'https://api.ebitex.io/content/management/v1/publish-plan';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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://api.ebitex.io/content/management/v1/publish-plan \ --header 'Authorization: Bearer <token>'Starts a job that works out what publishing some content would involve. roots is a list of { "kind", "id" } naming components and page nodes. The plan resolves everything those roots depend on and reports, per item, its version, publish status, validation errors, and workflow state, including whether a workflow blocks publishing it.
deliveryEnvironmentId names where to publish. It can be left out when the environment publishes to exactly one delivery environment; GET /topology lists them.
The job runs in the background. Poll GET /operations/{id} until its status is succeeded, then read the plan from its result and send the items you want to POST /publish.
Key: a management key with content.management.publish.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”{ "id": "…", "status": "queued" }: the job’s id, to poll. The finished job’s result is { "items": [ { "kind", "id", "name", "path", "headVersionNumber", "publishStatus", "validAgainstOwnPin", "ownPinErrors", "validAgainstLatest", "latestErrors", "workflowDefinitionName", "workflowStateName", "workflowPublishBlocked", "activeRunPinnedVersionNumber" } ], "danglingReferences": [ … ] }.
validation_failed: no body. delivery_target_not_mapped: deliveryEnvironmentId is not a delivery environment this environment publishes to. no_delivery_target_mapped: this environment publishes to no delivery environment. ambiguous_delivery_target: it publishes to several, listed in mappedDeliveryEnvironmentIds; name one as deliveryEnvironmentId. unknown_property: the body has a property this API does not recognize; the response names it in property. invalid_json: the body is not valid JSON.
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.
payment_required: the organization’s subscription needs attention.
scope_denied: the key lacks this route’s scope. tier_required: the Content Management API needs the Pro plan or above. ip_denied: the caller’s address is outside the key’s allowed ranges. app_not_available: Content is not enabled for the organization.
Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.
bulk_operations_paused: background jobs are temporarily paused. Retry later.