Export Content via REST API
Overview
This page describes how to export content using the REST API. To export content you have to:
- Create an access token for authentication (once).
- Start the export job (the server will return the ID of the job).
- Fetch the status of the export job repeatedly until it finished.
- Download the exported file when the export job has finished.
For more details, read on or take a look at the example scripts: https://bitbucket.org/K15t/scroll-exporter-rest-api-scripts
Authentication
Personal Access Token(s) can be created in your user profile. Simply navigate to: User Profile Icon (top right) > Settings > Scroll HTML Exporter API Tokens.
This token can be used for as many exports as you want, as long as it exists.
Once created, the token must be added via the Authorization
header to all HTTP requests:
Authorization: Bearer <my-token>
Data Residency Consideration
Scroll HTML Exporter supports data residency for Confluence Cloud and this means when using the REST API, both the app installation and REST API endpoints need to be in the same region. Therefore, please ensure to use the correct URL based on your region:
- https://scroll-html.us.exporter.k15t.app/api - US region
- https://scroll-html.de.exporter.k15t.app/api - Europe / German region
You can learn more about data residency and Scroll HTML Exporter here.
IDs used in Export Parameters
When starting an export, you may need to provide several IDs to the API. Here's how to locate them:
Page / Blog Post ID | Can be found by opening the Page Information screen via ... → Advanced details → Page Information The ID is contained in the URL of this screen, for example: |
---|---|
Template ID | Can be retrieved by inspecting the template information in the space/global template list Action ••• menu. |
Scroll Documents: Variant ID | Can be found for a Scroll Document by opening the document reader, selecting the variant and then click Share. This produces a URL that contains the variant ID, for example ...&variantId=dt4b89 |
OpenAPI Specs
The API specs below represent the lastest API provided by the Cloud version of Scroll HTML Exporter. You may download the OpenApi spec file specific to your data residency region at:
- US region : https://scroll-html.us.exporter.k15t.app/api-docs/1/openapi.yaml
- Europe / Germany region: https://scroll-html.de.exporter.k15t.app/api-docs/1/openapi.yaml