cancel
Showing results for 
Search instead for 
Did you mean: 

Utility-HTTP-REST API-Images

DipinDevP
Level 6

Hi,

I need a help on handling images on REST APIs with Utility-HTTP object.

I have 2 requests to make to 2 different APIs. One request will respond with an image in the body in some format. In the second request I need to post the same image using another API call. How can I do this?

1st API Call in Postman:

DipinDevP_0-1746681130681.png

2nd API call in Postman:

DipinDevP_1-1746681266800.png

Please anyone help me to achieve same in the Blue Prism.
@Neel1 @steven.boggs @ewilson
@shashank.kumar280 @RonanConsidine 

1 BEST ANSWER

Helpful Answers

ewilson
Staff
Staff

@DipinDevP 

First thing you want to make sure of is that you're using the latest Utility - HTTP VBO from the DX.

For the first API call, I imagine you're going to need to save the image to a local file at least temporarily. If so, You'll want to use the HTTP Request File action and set the appropriate input parameters (ex. Method will be "GET", FilePath will be set to a fully qualified path a file name for where you want to save the file to, etc).

For the second API call, you'll want to look at the HTTP Request Multipart action. This will let you set a multipart form upload submission. Set the Method to "POST". You'll also need to pass in a Collection for the FileMetadata input. It's not clear if you might also need to populate a Collection for the FieldMetadata input too as your image doesn't show all the headers or the body content.

Cheers,
Eric

View answer in original post

1 REPLY 1

ewilson
Staff
Staff

@DipinDevP 

First thing you want to make sure of is that you're using the latest Utility - HTTP VBO from the DX.

For the first API call, I imagine you're going to need to save the image to a local file at least temporarily. If so, You'll want to use the HTTP Request File action and set the appropriate input parameters (ex. Method will be "GET", FilePath will be set to a fully qualified path a file name for where you want to save the file to, etc).

For the second API call, you'll want to look at the HTTP Request Multipart action. This will let you set a multipart form upload submission. Set the Method to "POST". You'll also need to pass in a Collection for the FileMetadata input. It's not clear if you might also need to populate a Collection for the FieldMetadata input too as your image doesn't show all the headers or the body content.

Cheers,
Eric