Send attachment from Servicenow to JIRA using REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2017 02:59 AM
I am working in ServiceNow to JIRA integration using REST API, I have implemented all the fields to create JIRA issue.
I am currently trying to send attachment from ServiceNow to JIRA ticket using mid server.
I used the below code as example in the post Jira REST Integration - How to send attachment? :
var request = new sn_ws.RESTMessageV2();
request.setHttpMethod('post');
request.setRequestHeader("X-Atlassian-Token","no-check");
request.setRequestHeader("Content-type","multipart/form-data");
request.setEndpoint('https://{jiraURL}/rest/api/2/issue/SN-2/attachments');
request.setBasicAuth("username","password");
request.setRequestBodyFromAttachment('abd7460b0fe39e001dc906ace1050e9f'); //sys_id of attachment record
var response = request.execute();
I am getting error in ECC Queue as 'attachment does not exists'
If anyone implemented this , please let me know .
Thanks in Advance.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2017 03:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2017 03:35 AM
Hi Rathika,
Thanks for your reply.
I have already checked this link, BTW I have implemented ticket creation, and comments update.
I need to send attachment to JIRA.
Appreciate your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2017 11:26 AM
Were you able to send attachments to JIRA from SN?
We are also struggling and any help will be highly appreciated.
Thanks.
Mayur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2017 01:01 PM
I was able to get attachments sent over to Jira using a mid server. Let me know if you want the code.