Hi,
I'm using REST API of confluence and successfully got page content, body etc.
Community moderators have prevented the ability to post new answers.
Hi Zubaidullo,
The only one I could see that returned the space labels is the spacedirectory/1/search method (which is private, but still accessible, although I'm not sure if it's accessible from Connect). The only problem is that there is no built-in way to filter by space key, so as long as you don't have too many spaces I would just get them all and loop through them to get the one you need (there is a query parameter, but it searches name and description, not key).
https://<your Confluence>/rest/spacedirectory/1/search?type=global
should do the trick. You should install the REST API Browser; that would make finding API calls much easier.
Thank you, Stephen. It was useful information and I got what I needed. )) There is something about category and it's enough.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To add on, for those of you who are having problems getting > 50 spaces, try this:
Then search for spacedirectory/1/search
The parameter starts from 0....it will return you a maximum result of 50 ( 0 ~ 49)
Thus to get 51 or index 50 onwards simply:
/rest/spacedirectory/1/search?startIndex=0&type=global
/rest/spacedirectory/1/search?startIndex=50&type=global
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.