cancel
Showing results for 
Search instead for 
Did you mean: 

How to download a file using web api.

AZ
Level 3
I want to download a file using Web API. After making request we are getting File data as text in the response content data item.

For your reference I am getting the response as below as text type.

%PDF-1.4 %����
68 0 obj <</Linearized 1/L 1850803/O 70/E 262535/N 13/T 1849323/H [ 916 320]>> endobj
xref
68 31
0000000016 00000 n
0000001236 00000 n
0000001456 00000 n
0000001821 00000 n
0000001957 00000 n
0000002087 00000 n
0000002229 00000 n
0000002972 00000 n
0000003602 00000 n
0000004428 00000 n
0000005000 00000 n
0000005715 00000 n

I am not adding all the content here.

How can we save this content as a original file.

Please help, its an urgent.

Thanks
K

------------------------------
A Z
------------------------------
12 REPLIES 12

@Sheela Parthasarathy,

The Web API service feature does not currently support downloading binary data. It only supports textual data. To download a binary file (ex. PDF, ZIP, etc) you can use the latest Utility -HTTP VBO (available on the DX) or write your own ​code stage.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

@Eric Wilson

I read the guide for HTTP VBO and Im not able to find any reference to get output as Binary, I can see all the request output types are set as Type only.
https://digitalexchange.blueprism.com/dx/entry/3439/solution/utility---http
Could you please let me know if this is the VBO you referred.

Regards,
Sheela

​​​​

------------------------------
Sheela Parthasarathy
Assistant Consultant
TCS
Pacific/Apia
------------------------------

@Sheela Parthasarathy,

That is the correct VBO. There is an action on it called HTTP Request File which can be used to download a binary file.

11915.png

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------