The CreatorCon Call for Content is officially open! Get started here.

Downloading attachments from REST API GET..

Sharique Azim
Mega Sage

Hi,

I am trying to download a file using scripted REST API for GET.

 

I have gone through Tutorial: Uploading and Downloading Attachments through REST with Fuji (no Attachment API) ,but didnt quite understand it.

according to this Attachment API - GET -ServiceNow Docs,  it returns binary files, but what if i am trying to download .bin files?

My whole intention is to provide a web url, rest api to get (download)t he attachment attached to a particular record/place  in my database, ill make use of the file later.

 

Thanks in Advance.

Shariq

 

1 REPLY 1

Rahul Jain11
Kilo Guru

APIs are only retrieve the data from the system. It will not download the attachment, using API you can get the url of the attachment and when you clicked on the URL it will download the file.

Otherwise use the binary code to returned by the API to convert into the attachment file and download into the system from where this API has been called.

 

Thanks