Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to add label from command line? Edited

junichi I'm New Here Jun 26, 2021

I deleted a label by executing following from windows command line

curl -X DELETE -u myname@domain:aaaaJyjTW5ELIcZmZd1fQ6F65 "


I want to add a label in a similar manner. My attempt was to execute following but this does not work. 

curl -X POST -u "" --data "[{"prefix":"global", "name": "section_a"}]" -H "X-Atlassian-Token: no-check"

1 answer

0 votes


Happy to help ensure the endpoint is accessible and returning the correct results. To understand what aspect isn't working, could you please either send over the error message to include a (sanitized) screenshot of the output?

Another option would be to run a GET on a page with labels to review the JSON formatting there to ensure what you have matches. 

GET /wiki/rest/api/content/{id}/label  OR GET /wiki/rest/api/content | See Expand metadata.labels 

Stephen Sifers

Suggest an answer

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

🏑 Atlympic Event: Confluence

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

469 views 18 16
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