Forums

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

How get attachment content from issue via API?

Rafael Costa
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.
October 6, 2022

I'm trying to do it reading this doc: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-attachment-content-id-get

But I'm receiving 404 when I try to get it:

https://your-domain.atlassian.net/rest/api/3/attachment/content/{id}

The values was replaced correctly in the url

The content is an txt file.

How can I get this content's attachment?

1 answer

1 accepted

0 votes
Answer accepted
Florian Bonniec
Community Champion
October 6, 2022

Hi @Rafael Costa 

Your question is tagued with server but you try to use cloud API.

Use this one instead

https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/attachment-getAttachment

 

Regards

Rafael Costa
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.
October 6, 2022

I already had saw this doc, but I would like get content instead some metada.

But some metadata was a URI to attachment, then I curl this URI and I can get the content! Thanks!!!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events