Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,383
Community Members
 
Community Events
165
Community Groups

How to add labels to confluence pages in bulk?

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?

  •  Is there a way to select multiple pages and do a bulk update to apply a label ?
  • Is a way to apply a label recursively from the parent page to all of the corresponding child pages. 
  • At last, what are all the available options to apply labels to pages in Confluence.

    Kindly someone help !!!!!

 

~Rahini

3 answers

@Kishan Sharma / @Jillian Patterson ,

Can you share the steps for updating labels in bulk using REST API for confluence? 

 

Thanks,

 

Rahini

Kishan Sharma Community Leader Aug 09, 2021

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.

@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 !!!

Kishan Sharma Community Leader Aug 10, 2021

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. 

How about for the those of use who are NOT admins?

Like Arne Klindt likes this

Hi @Rahini Balamurugan

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!

Sure thanks @Jillian Patterson and @Kishan Sharma 

we are not having ScriptRunner for Confluence. Do we have any plugin which will help me?

 

Thanks!!!!

0 votes
Kishan Sharma Community Leader Aug 06, 2021

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.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

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...

273 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you