Remote API (Cloud only)
Last updated
Last updated
It is possible to start an export and download the result remotely through a Remote API.
First, set the Remote API to "enabled" on the Content Exporter admin page. Go to the Content Exporter section on the Confluence administration page and choose Remote API menu point, then enable Remote API
After clicking the button, the next page will show the user, in whose behalf the exports will be started.
Currently, the user account for starting exports remotely cannot be changed from the logged in admin user (Current User). Make sure to generate the API Key with a user with proper permissions on the pages that are meant to be exported.
Only one API key can exist at a time for an instance.
Click on the Generate API key button. On the next screen, click the Copy to copy the generated API key to the clipboard.
Make sure the API key is saved. For security reasons, it can only be copied at the time of generation. Once the Done button is clicked, the generated API key cannot be revealed anymore. If a new API key is needed, the Enable Remote API toggle should be switched off - thus the old API key will be lost - and on again.
Click the Done button. The Remote API screen shows the user to whom the API key belongs.
If the API key needs to be revoked or another API key needs to be generated, set the Enable Remote API toggle to off.
the generated API key (see section Set up Remote API)
URL of the running application <APPLICATION_URL>
for the US region: https://content-exporter-new.addon.meta-inf.hu
for the EU region: https://content-exporter-new.addon-eu.meta-inf.hu
the ID of the (parent) page <PAGE_ID>
For the Start Export API add the generated API key as a header
Key: CEX-API-KEY Value: <the generated API key>
The parent page ID should be added both in the URL and in the Request body's rootContentId
See an example for the Request body below
As a best practice, we suggest starting a desired export from the UI for the first time while the console's Network tab is open and using the proper parameters from the init call's payload.
It is also possible to download the Export Profile from the Export Profile admin page as a JSON file as a reference.
The Start Export call should return a hash. This hash is needed in the following steps.
For the Poll started export progress API add the generated API key as a header
Key: CEX-API-KEY Value: <the generated API key>
An example response of the poll request looks like the following json.
Poll until the "progressValue" parameter reaches 100.
For the Poll started export progress API add the generated API key as a header
Key: CEX-API-KEY Value: <the generated API key>
Save the response to a file.
The full OpenAPI descriptor of the Remote API can be downloaded below.