How to send Multipart form data from ServiceNow

Shalika
Tera Expert

I have to send attachments from ServiceNow to Jira using REST message. I cannot use plugins or Integration Hub. 

I have created a REST message for that -- 

Endpoint is -- https://******************/rest/api/3/issue/SSP-8441/attachments

In header I am sending--

Content-Diposition - form-data

Content-Type - multipart/form-data; boundary=AAA

X-Atlassian-Token - no-check

In the content I am sending the payload as

{
      "attachments": [{
          "content_type": "image/png",
          "file_name": "Screenshot (153).png",
                "size_bytes ": "137246 ",
          "sys_id": "f576b5211b091950f7b82fcde54bcbae",
"Content-Transfer-Encoding": "base64${base64EncodedData}"
      }]
  }

While testing 200 response code is coming, but no attachments being added to the Jira end

4 REPLIES 4

Tom Sienkiewicz
Mega Sage

Multipart only works in IntegrationHub REST Step. The only other option I know of is to send a regular REST to a MID Server and set up another web service on your MID Server, which will reformat the payload and trigger the target API.

How to send REST message to MID server?

Rupesh Ram Chi1
Tera Contributor

Hi @Shalika 

 

Is your issue resolved ? are you able to send attachments to Jira Issue from SN ?

if yes can u please let me know how is it resolved ? we have similar requirement and issue ?

Community Alums
Not applicable

HI @Shalika / @Rupesh Ram Chi1 , 

 

Did you got the solution?

If yes please post the solution

 

Thanks

Lithesh