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

setRequestBodyFromAttachment send attachments to external API

sieusaopolo15
Tera Guru

Hi,

I have an external API which is developed by myself and I tried to get the file at the API but can not. I want to ask what data send to my external API and is it retrievable in my API ?

3 REPLIES 3

Amit Pandey
Kilo Sage

Hi @sieusaopolo15 

 

Can you elaborate your question in details? Also, please check this-
https://www.servicenow.com/community/developer-forum/how-to-download-attachment-from-url/td-p/282846...

 

Regards,

Amit

Hi @Amit Pandey ,

Thanks for replying Amit but I think the link is not what I referred. From ServiceNow, I want to send an attachment to external API. In my developed API I retrieved the data but can not used it process it like a normal file get from local machine. So my question is what is the data type of the attachment sent to my API, is it binary or base64 and can external API understands what is this kind of data to retrieve it ?
FYI: The API I developed is a google cloud function.

Amit Pandey
Kilo Sage

In that case, you will have to consume their APIs. Ideally a REST message is created and that is triggered by Business Rule. Can you share what API details they have provided so that I can assist you.