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

1 vote
Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events