Forums

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

How to attach an attachment to a JIRA request

Jeff_Liekens May 10, 2020

I'm trying to attach an attachment to my Jira service ticket. I've found 2 URLs which could do this.

1.  

{jiraUrl}/rest/servicedeskapi/servicedesk/{serviceDeskId}/attachTemporaryFile

2. 

{jiraUrl}/rest/api/attachment/3/issue/{issueId}/attachments

 

I've sent to both the same parameters:

- X-Atlassian-Token: no-check

- accept: application/json

- multipart/form-data (file with name file)

(- Basic authentication)

When I sent my first request I receive a 500 response without further details.

When I sent my second request I receive a 404 without further details.

1 answer

1 accepted

3 votes
Answer accepted
Ismael Jimoh
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.
May 10, 2020

Hi @Jeff_Liekens 

This is the official expected URL on using rest api to add attachments https://docs.atlassian.com/software/jira/docs/api/REST/8.1.0/#api/2/issue/{issueIdOrKey}/attachment .

Please note the causes for Response 404 and ensure you have the necessary permissions.

Let us know how it goes.

Jeff_Liekens May 10, 2020

Hi @Ismael Jimoh

I've modified the request to the above URL. It worked perfectly.
Thank you for the quick response!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events