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

0 votes
Sunny Ape
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.
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.

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