Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

List All Confluence spaces with REST API

Antoine
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 26, 2016

As mentioned in the title, i'd like to list all the spaces of a confluence instance with REST API.

I make a request which should list all the spaces but it return only 500 items ...

Is there a limit ?

I've set "limit=1000" in my request, is anyone know ?

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Antoine
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 6, 2016

   

Terri Booker August 27, 2019

Disregard.... I think we figured it out...

Hi Antoine - I have a bit of an issue I noticed recently using this REST API - I am not seeing all the Spaces, and I have under 300 spaces... but some spaces are not in the file... what would cause them not to be included, since the limit is for 300 and we have less than 300.. 

 

0 votes
KyleGershman October 26, 2016

Which API are you using? (curiously)

If you do the search API via rest/api/search, there is a 500 limit.

I get a list of spaces via rest/api/space and I don't know if there is a limit there.

Antoine
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 26, 2016

I use rest/api/space ...

KyleGershman October 26, 2016

Hmm...thanks for heads up...I wasn't even aware that limit was a parameter.

I'm not sure how the recursion (mentioned blow) would even work unless you are capturing a from/to space on each call and putting in subsequent calls...

Weird.

0 votes
Jonas Andersson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 26, 2016

That seem to be due to a hardcoded limit after confluence 5.. More about it here:

https://answers.atlassian.com/questions/258816

 

Antoine
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 26, 2016

I don't really understand, i must change my code by adding recursion ?

Like WW likes this
TAGS
AUG Leaders

Atlassian Community Events