The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add label to an attachment using rest api

Saquib Fraz
Contributor
July 20, 2020

Hello there!

I've gone through multiple posts on this community and there are multiple alike posts available. My requirement is simple - how to provide label to a particular attachment at the time of uploading the file. File uploading process is performed using rest api.

In this link - https://community.atlassian.com/t5/Answers-Developer-Questions/Add-Label-with-REST-API/qaq-p/533938

multiple answers are which helped me to post label using api but that was globally..but the ask is for a particular attachment.

Any support is appreciated.

Thanks

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Deleted user
July 24, 2020

In Confluence, attachments are types of content, just like pages, so you can reference them by ID and their label value, using:

/wiki/rest/api/content/{id}/label

 

Read here for more information

TAGS
AUG Leaders

Atlassian Community Events