I deleted a label by executing following from windows command line
curl -X DELETE -u myname@domain:aaaaJyjTW5ELIcZmZd1fQ6F65 "https://domain.atlassian.net/wiki/rest/api/content/942768148/label?name=label_to_delete
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 myname@domain.com:aaaajTW5ELIcZmZd1fQ6F65 "https://domain.atlassian.net/wiki/rest/api/content/1004568706/label" --data "[{"prefix":"global", "name": "section_a"}]" -H "X-Atlassian-Token: no-check"
Hello,
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
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.