Export a bundle
const url = 'https://api.ebitex.io/content/management/v1/export';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/export \ --header 'Authorization: Bearer <token>'Builds a transfer bundle from the key’s environment and returns it: the document /import-plan and /import take. Nothing is stored; the bundle exists only in the response.
Send exactly one of:
roots: a list of{ "kind", "id" }. Each root brings its dependencies with it (the contracts, templates, adapters, categories and referenced components it needs). A page node does not bring its child pages or standalone components nobody references, so name every node, stream and standalone component you want as a root of its own.wholeEnvironment: true: every item in the environment, including ones nothing references. This is how to adopt an existing environment into source control.
A bundle carries blob ids, never blob bytes. Move media with POST /blobs.
Key: a management key with content.management.read.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”The bundle document, as JSON. Its formatVersion says which bundle format it is written in.
validation_failed: no body, or not exactly one of roots and wholeEnvironment: true. 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.