REST API V2: How to get all content in a space?

Heinrich Ulbricht _WikiTraccs_
Contributor
September 25, 2024

Edit: I moved the question over to the Dev community but cannot delete here. Mods, please feel free to delete.


I need to get the content IDs of all contents in a Confluence Cloud space.

Using v1 REST API I could do that using the space/<SPACEKEY>/content endpoint, or one of the space/<SPACEKEY>/content/<TYPE> endpoints.

Those are deprecated and I must use v2, so the documentation says.

But how?

There are only v2 REST API endpoints for getting pages in a space, and blogposts in a space.

But what about databases, whiteboards, folders, smart links, you name it? How to get all of those in a space?

(And before you say CQL or search-based approaches: I cannot use them, because restricted contents won't be included in the result, even if the user asking has permissions to see them.)

How to get all space content in Confluence Cloud with non-deprecated REST endpoints?

1 answer

0 votes
Benjamin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 27, 2024

Hi @Heinrich Ulbricht _WikiTraccs_ ,

 

Looking through the v2 API, this might be close to what you are looking for.

 

https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-spaces-id-pages-get

 

This API should get the pages base on space. Hope this helps

Heinrich Ulbricht _WikiTraccs_
Contributor
September 28, 2024

@Benjamin But this only returns pages, right? I need the other content types as well.

Benjamin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 28, 2024

Haven't tried it myself. That is probably the closet related API to your needs. Worth a test. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events