In the v1 API we can use wiki/rest/api/space?expand=metadata.labels
-
metadata.labels
returns the space labels, which are used to categorize the space.
I don’t see a way to get this information in the V2 API. The /labels endpoint is only available for pages/blogposts/custom-content/attachments. Will this functionality be fully deprecated now?
3 Likes
Great question @JnisVanags . I assume the answer is yes, but I’ve forwarded this on to the Confluence Cloud Ecosystem team to ask them to respond.
@JnisVanags - thanks for the feedback here. We do need to address this gap.
There is this experimental endpoint, but it does not have the same behavior as the V1 space expand.
At a minimum, what needs to happen here is we need to update the experimental endpoint to only return labels that are associated with a space (and not the content within a space), and bring this endpoint out of experimental. This would at least address the gap here.
In the future, a V2 set of endpoints needs to be developed for space labels.
Well that is a terrible solution for developers, that will result in a ton of calls to only serve one purpose, to get all spaces information that are relevant for someone…very inefficient. To what future are you referring? as per my knowledge we have to move to v2 until october?
Why would i, for example if i want to get all spaces and their info, first make a getAllSpaces() call (this is already not true since you have to do this call over and over again as the limit is set to 25…) and then make additional calls for every single space to get additional information ? I cant get why you make decisions to fully drop something before having a meaningful alternative…
1 Like
Hi @MusaRochi!
These tickets can be tracked to get updates on fetching labels applied to spaces, and content within spaces:
A few more things that could be helpful:
- There is only a subset of V1 endpoints that are deprecated, and those are noted here and here.
- These endpoints are scheduled to have access removed in 2024
- You can use the
limit
query parameter to increase the amount of results returned from certain requests (usually up to 250)
1 Like