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: 

415 error when sending attachment to JIRA from ServiceNow

Nikhil Singh
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!
October 23, 2023

Hi 

I have added Headers as

1. Content-type: application/json

2. X-Atlassian-Token: nocheck

sample payload

{
    "attachment": [
        {
            "content_type""image/png",
            "file_name""postman.png",
            "size_bytes""1124594",
            "sys_id""afcbf3e1474ab5104b5b9e79e16d4398",
            "Content-Transfer-Encoding""iVBORw0KGgoAAAANSUhEUgAACGgAAAX0CAYAAACfQ617AAAMP2lDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnluSkEBCCV1K6E0QqQGkhNACSO"
}]
}image.png

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Deleted user
October 23, 2023

Hello @Nikhil Singh 

You said you were sending the attachment from ServiceNow, but you've shown a screen grab of a Postman session?

The payload of your request is completely wrong; there are no such parameters as those that you've put into the request body. It looks like you're trying to put abstract data about the issue itself inside the body!!

I suggest you re-read the the appropriate section of the documentation again, look at the examples given, then do a Google search and read some of the thousands of articles on the internet on how to use Postman to send files to endpoints as multipart/form-data data.

Have fun on your learning journey.

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

Atlassian Community Events