The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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
@Kishan Sharma / @Jillian Patterson ,
Can you share the steps for updating labels in bulk using REST API for confluence?
Thanks,
Rahini
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.athenahealth.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.athenahealth.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.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.