The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Error when trying to use JIRA Rest API to add attachments to an issue

João Vítor Montanholi Nunes
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!
December 7, 2022

So, I've been trying for a couple of days to make this integration work, and I feel I'm almost there. I managed to create the issue and then create the temporary attachments through the REST API, unfortunately when it comes to creating the permanent attachments on a issue I keep getting 404 error, saying that my issue was not found.

I'm following the documentation path, being:

POST /rest/servicedeskapi/request/{issueIdOrKey}/attachment

 

```fetch(
          `https://my-     kurve.atlassian.net/rest/servicedeskapi/request/${response.data.issueId}/attachments`,
          {
            method: 'POST',
            body: {
              temporaryAttachmentIds: [json.temporaryAttachments[0]],
            },
            public: true,
            headers: {
              Authorization: JIRA_API_KEY,
              Accept: 'application/json',
              'X-Atlassian-Token': 'no-check',
              'X-ExperimentalApi': true,
            },
          }
        )```
I'm thankful for any responses!

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events