I'm trying to return all the labels within a space. Is there a way to do this?
Thank you,
Blake
Hi Blake,
There's not a way to directly search for all labels within a space using the REST API, but as an alternative you can return all pages with their labels.
You can use this URL to return all pages with their labels (replacing with your site and spacekey):
https://<sitename>.atlassian.net/wiki/rest/api/content?spacekey=<spacekey>&expand=metadata.labels
Then, you can use a script to parse through the results to find the unique labels in the metadata.labels object for each page.
-Zak
@Zak Laughton
Hello Zak,
We are using the URL you have posted to load and search labels through a drop-down field but I think there is a small problem.
On a big scale with hundreds of pages and labels, the page takes too long to load
all the labels and it's a bit annoying.
Is there any alternative way to do this?
Like when we adding labels in a page and there are some suggestions like the photo.
Thank you,
Mixalis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would be indeed very nice to have an endpoint, that returns all labels used in a specific space.
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.