My goal is to retrieve all Spaces and their assigned categories via REST. Some notes:
- I have an user granted system admin privileges (Settings -> Global Permissions -> Individual Permission).
- I am able to authenticate this user via rest and return a full list of existing Spaces.
- I am able to return categories on Spaces that have Anonymous Access Enabled. Via Python:
import urllib.request
my_url = '<my_URL>/rest/api/space/<mySpaceKey>?expand=metadata.labels'
with urllib.request.urlopen(my_url) as response:
html = response.read()
- The above, I'm able to process the return for what I need, where name key is my category, bolded for readability:
"metadata":{"labels":{"results":[{"prefix":"team","name":"general_category","id":"15686785"}- The same user, I query a space that has Anonymous Access Disabled, and a 404 returns via Rest. When turning Anonymous Access on, I'm able to return what I'm looking for via REST.
- The same user, Anonymous Access Disabled, I access the query via web browser and I'm able to see the data I seek.
How can I access this data via REST without turning on Anonymous Access for all my Spaces? Thanks so much in advance!