Read Content

Read content from your spaces (pages, versions, assets, content)

The GitBook API is currently in beta phase. If you wish to be one of our testers, please contact our team at [email protected].

Routes

The examples in the pages linked below only include routes for the primary revision of a space (/v1/spaces/:spaceID/content).

Route

Primary revision of the space

/v1/spaces/:spaceID/content

Current revision of a draft

/v1/spaces/:spaceID/drafts/:draftID/content

Specific revision

/v1/spaces/:spaceID/revisions/:revisionID/content

Examples

List all latest pages and assets in this space main variant:

curl https://$HOSTNAME/v1/spaces/-LvtJeIxDqSArlpsdopT/content \
-H "Authorization: Bearer $TOKEN"

Get the latest content of a specific page:

curl https://$HOSTNAME/v1/spaces/-LvtJeIxDqSArlpsdopT/content/v/master/url/rest-v1/content/read-content \
-H "Authorization: Bearer $TOKEN"

Endpoints

List the pages and versions of a space:

Read the content of pages:

List the assets of a space: