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.
In an organization with more than one realm, the bundle names the realm it was exported from (source.realmKey) and the realm that owns each item (realmKey), and includes the ancestor realms’ items the export needs. An organization with one realm writes no keys at all.
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.
The key acts as its role. Contracts, templates, adapters, streams and categories each need the role to hold that kind’s manage permission (content.contracts.manage, content.templates.manage, content.adapters.manage, content.streams.manage, content.taxonomy.manage), and components and page nodes are subject to the branch access rules. The export is checked against everything the bundle would contain, dependencies included: exporting a component brings its contract, so it needs content.contracts.manage. A whole-environment export contains every item, so a key whose role cannot view some branch, or cannot manage some kind, cannot make one.
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.
permission_denied: the bundle would contain a kind the key’s role cannot manage; permission names the permission it lacks.
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.
The bundle would contain a component or page node in a branch the key’s role cannot view.
Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.