Forums

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

How to add an extra lable or tag while upload an attachment of an issue using cloud rest api.

jay
Contributor
August 29, 2024

I am using the below api to add / upload attachment. I need to add a new label/ tag that is "resolved" with that attachment. Because while fetching the attachment info I want to check whether that attachment is "resolved" or not. is there any way to add that.

url:  /rest/api/2/issue/{issueIdOrKey}/attachments

1 answer

1 accepted

1 vote
Answer accepted
Anandhi Arumugam _Cprime_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2024

Hi @jay You cannot add a tag or a label when POST to add attachments. You need to add attachments and the Edit issue to add a label. 

/rest/api/2/issue/{issueIdOrKey}

Hope this helps!

jay
Contributor
August 30, 2024

Thank you @Anandhi Arumugam _Cprime_ for your help and support.

jay
Contributor
September 2, 2024

@Anandhi Arumugam _Cprime_ when I create a comment using the REST API, when I try to add the attachment details in to it it throws the "attachment validation error". Please look into the below values:

When I add the attachment id values which is "10050"Which I got after upload the attachment. It throws error. But when I add "16ffe152-698f-5ed8-aa8a-f04b90f0c748"this value as attachment id it takes and display in jira. I got this value from get issue detals using REST API.

I don't know how to get this value?

 

Suggest an answer

Log in or Sign up to answer