a week ago
Hello,
I am trying to perform a curl post for the following, am not a web developer and have very limited experience with APIs. I am told I cannot use the Web API services in this situation as I need to go through a proxy (no userid or password needed). I was planning on using a string replace for the variable values (Employee Number and External Unique ID) .I have attempted quite a few times to make this work to no avail. I thought I could use HTTP utility below as it supports proxy, not sure of the values (for method) and in particular of what the "body" should look like. I have tried a few variations and keep getting a message saying I have misplaced double quotes. I did look at the other posts regarding curl post but I need something a little more basic
Thank you in advance for any advice!
Monday
curl is already embedded if you are using windows 10 and latest. You can use the Utility - Environment to execute curl command(s).
Monday
Hi @a026833,
The curl is not supported by Blue Prism directly. You can test your API in Postman and then replicate the same in Blue Prism using BP HTTP Utility or Web Services.
Please find the below links that might be helpful to you-
Web Services: https://docs.blueprism.com/en-US/bundle/blue-prism-enterprise-6-7/page/helpWebServices.htm
HTTP Utility: https://digitalexchange.blueprism.com/cardDetails?id=115162
Supporting Videos: https://www.youtube.com/watch?v=hLvKO7unvgI
If you find this information helpful, kindly mark this response as the best answer.
Monday - last edited Monday
Hi
As @saha1sourav2 mentionned, try to give us a postman template and then we will make the same on Bp
Monday
Hi @a026833
I think the best way is as @saha1sourav2 mention try your API on the postman and with that same you can create webservice in BP system tab or can use HTTP Utility object for your need.
Thanks.
Monday
Using the Utility - HTTP VBO, and traversing a proxy, your request will look something like this:
BTW - This appears to be a request to Salesforce. Are you aware we have the Salesforce Power Pack which is an implementation of the SFDC Lightning REST API?
Cheers,
Eric
Monday
@a026833 I forgot the cookie part. For that, you'll want to create a single row Collection data item. Set the column name to cookie and its data type to Text. Then set the value of the column to your cookie value (scratched out in the picture). Then pass this Collection into the HTTP VBO request to the Headers parameter.
Tuesday
There are several ways to post data in curl. Below are some:
1. Using double quotes (") twice
E.g. curl -d '{""body"":""this is my message body.""}
2. Using backslash (\)
E.g. curl -d '{\"body\":\"this is my message body.\"}'
3. Using JSON file
E.g. curl -d @'<json filepath>'
or
curl -d @<json filepath>
Sample JSON file content:
{"body":"this is my message body"}