We are using confluence server. I know how to add label to a particular page. but I wanted to know if there is an option for the below requirement?
~Rahini
Hi @Rahini Balamurugan You can use REST API to find out pages by content ID and apply labels to them. Alternatively if you have ScriptRunner for Confluence app you can do some bulk operations on labels. Refer this thread for details.
@Kishan Sharma / @Jillian Patterson ,
Can you share the steps for updating labels in bulk using REST API for confluence?
Thanks,
Rahini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please refer Add Labels method to add labels to your confluence page. You can try it once on a sample page. Once you find it working, just use "Get content" method to get all your pages IDs, and loop through them and add labels to them one by one.
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.
@Kishan Sharma / @Jillian Patterson ,
curl -u admin:admin -X GET "https://devconfluence61000.example.com/display/RS/API+TESTING+page"
The above command retrieves the entire page details along with the label name.
whereas, while using the page id of the above page like below
curl -u admin:admin -X GET "https://devconfluence61000.example.com/confluence/rest/api/content/301663506/label"
The above command also retrieves the entire page details but I couldn't see the label details.
Please help !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the second command you should get a response something like this -
{"results":[{"prefix":"global","name":"label1",
here label1 is the label attached to the page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How about for the those of use who are NOT admins?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Like Kishan mentioned, if you've got ScriptRunner for Confluence you can add, remove, or rename labels in bulk (and many other operations) and code-free using the built-in scripts. Hope that helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure thanks @Jillian Patterson and @Kishan Sharma
we are not having ScriptRunner for Confluence. Do we have any plugin which will help me?
Thanks!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This post is from 2021 @Rahini Balamurugan, if you have moved to cloud then you might want to get an app. For us it was important to restrict some label features, like merging, so we built an app called Label Manger by Easy Apps that does this.
In my opinion you don't want all users having access to all the bulk editing features.
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.