How can I Send attachment from one servicenow instance to another using rest api?

Arundhati
Tera Contributor

InstanceA is my source Instance and InstanceB is target instance if I add any any attachment to the incident at my target instance it should get reflected to my source instance. with this I also want to maintain a loop that no attachment should be get double if we we update another attachent. How can I achieve this using REST API

1 ACCEPTED SOLUTION

Martin Ivanov
Giga Sage
Giga Sage

Hi. You can. You have to convert the attachment to binary and then convert it back to attachment when recieved. please refer to the following articles:

- https://community.servicenow.com/community?id=community_question&sys_id=abe67b981b7300107a5933f2cd4bcbca

- https://community.servicenow.com/community?id=community_question&sys_id=a48f7db11beeb090ada243f6fe4bcb7d

- https://community.servicenow.com/community?id=community_question&sys_id=6cabff34db666780fb115583ca9619ab

 

Mark Correct and Helpful if appropriate. Thanks!


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

View solution in original post

7 REPLIES 7

Martin Ivanov
Giga Sage
Giga Sage

Hi. You can. You have to convert the attachment to binary and then convert it back to attachment when recieved. please refer to the following articles:

- https://community.servicenow.com/community?id=community_question&sys_id=abe67b981b7300107a5933f2cd4bcbca

- https://community.servicenow.com/community?id=community_question&sys_id=a48f7db11beeb090ada243f6fe4bcb7d

- https://community.servicenow.com/community?id=community_question&sys_id=6cabff34db666780fb115583ca9619ab

 

Mark Correct and Helpful if appropriate. Thanks!


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

check these links for solution

Video: How to Make REST Attachment API Requests

Copying attachment from one instance to another

Sending an attachment to ServiceNow via Web Services

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hello Ankur,

Can you please help me with the Rest message. How I can define Rest message query parameters for the same 

Can you please suggest how can we write an soap message for this?