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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events