How to create a REST API to download attachment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2019 01:34 AM
Hi All,
We have one requirement where we need to create a Rest API which will be used by other external system in order to download the attachment.
I am confused between Scripted Rest API, Rest Message and Rest API explorer as I am new to this. Please let me know in this case which method will be considered and if you can provide any reference to create a REST API to download the attachment, that would be really helpful for me.
Thank You.
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2019 02:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2019 06:09 AM
Hi Ram,
Could you please let me know how any external system be able to access our Attachment API in order to download the attachment?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2020 04:03 AM
Hi Ram,
Since processor is deprecated in servicenow and the alternative suggested is scripted rest api, can you suggest what change i should make in above script to work as rest api as i guess g_response will not work in that case?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2021 11:17 AM
How we can use the below packagae in scripted REST API
var out = new Packages.java.util.zip.ZipOutputStream(g_response.getOutputStream());