I'm using REST API of confluence and successfully got page content, body etc.
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).
should do the trick. You should install the REST API Browser; that would make finding API calls much easier.
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:
Do dance parties help you relieve stress? How about *virtual dance parties*? My team holds virtual dance parties to brighten the mood of a tough day or celebrate an upcoming weekend. Want t...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events