The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch list of all spaces in Confluence

Rakshatha Shetty
August 10, 2020

I'm using the API  https://confluence.com/rest/api/space?limit=2000 to fetch the list of all spaces in Confluence. But this API returns only 500 spaces. I'm aware since Confluence 5.5 there is a limit on number of results returned (i.e. 500). Is there a way to get all the spaces?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Tamas Baglyas
Contributor
August 10, 2020

Hi @Rakshatha Shetty,

The Atlassian set a hard limit, to protect the Confluence server for "accidentally" overload. If you want to get all the spaces you need to use the start properties, as much as you got size: 500
E.g.: https://confluence.com/rest/api/space?start=500&limit=500 and https://confluence.com/rest/api/space?start=1000&limit=500 and so on.
Or you can use type property to filter the global and personal spaces.
E.g.: https://confluence.com/rest/api/space?type=global&start=1&limit=500 or https://confluence.com/rest/api/space?type=personal&start=1&limit=500 and so.

Cheers,
Tamás

TAGS
AUG Leaders

Atlassian Community Events