Resolve a draft preview
const url = 'https://api.ebitex.io/content/management/v1/preview/resolve';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"kind":"example","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","document":{},"locale":"example","ctx":{},"resolveDepth":0,"annotate":false,"overrides":"example","deliveryEnvironmentId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
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/preview/resolve \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "kind": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "document": {}, "locale": "example", "ctx": {}, "resolveDepth": 0, "annotate": false, "overrides": "example", "deliveryEnvironmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Resolves a component or page as delivery would, from its current saved draft rather than its published version. Changes nothing.
Send kind (component or node) and id. To preview unsaved edits, send them as document: a component’s whole document, or { "payload": … } for a page. ctx is the visitor context used for personalization — omit it, or send {}, when there is none. locale picks localized values, and a resolveDepth above 0 expands references from their drafts as well. Links are composed as a delivery environment would compose them; name it with deliveryEnvironmentId when the key’s environment publishes to more than one.
Key: a management key with content.management.read.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “ Responses ”The resolved document.
validation_failed: kind is not component or node. invalid_context: ctx is not a valid context bag. delivery_target_not_mapped: deliveryEnvironmentId is not one the key’s environment publishes to. ambiguous_delivery_target: several are mapped; name one.
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.
access_denied: a branch access rule stops the key’s role viewing this component or page.
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.
No component or page has this id.
Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.