How to get the attachment files from REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2022 09:12 AM
I have set up the REST message for testing purpose between ServiceNow and SharePoint connected successfully. I am getting records from SharePoint, using REST API Get Method and receiving response in json format. In receiving records, there is a image file in every record, I am receiving image URL in every record but I require image file in json format instead of Image URL. How to get records along with image file as in json format.
Please note: If I open record in SharePoint I'm able to see Image file in each record.
Thank you.
Regards,
Santosh
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2022 10:16 AM
This depends on on sharepoint REST API.
Sharepoint REST API should provide attachment as base64 in the response.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 12:28 AM
Hi
If we get image file as base64 response from SharePoint, in Servicenow how we revert back as image. Please let me know.
Thank You.
Regards,
Santosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 08:32 AM
You can useGlideSysAttachment.write API method to decode base64 into image attachment record.
Check below for complete solution
https://community.servicenow.com/community?id=community_question&sys_id=cd48f944dbd327801089e15b8a9619d8
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2022 07:37 AM
Hi
Can you please provide base64 end point for reference purpose, we can replace with our example.
Regards,
Santosh