Forums

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

Add documents to jira issue by REST API

aatestuser
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 3, 2021

When i try to add document to issue by postman,

I get this message:

{    "code""UM9999",    "details"null,    "message""An unexpected problem occurred."}

Capture.PNG Capture.PNG

1 answer

1 accepted

0 votes
Answer accepted
Pramodh M
Community Champion
February 3, 2021

Hi @aatestuser 

The API is 

curl --request POST \
--url 'https://your-domain.atlassian.net/rest/api/3/issue/API-1/attachments' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'X-Atlassian-Token: no-check' \
-F "file=@myfile.txt"

The header 'X-Atlassian-Token: no-check' is a must and make sure you pass it when you send the request.

And path, you can give full path or relative path. The should be followed after @ symbol.

Thanks,
Pramodh

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events