cancel
Showing results for 
Search instead for 
Did you mean: 

POST/PUt rest api calls with JSON body

ArchanaAvarager
Level 2
I am trying to do a post call with json body. Not sure how to send the body under data collection using Webservice - Rest VBO

------------------------------
Archana Avaragere Mutt
RPA Developer
Premex
Europe/London
------------------------------
1 BEST ANSWER

Helpful Answers

david.l.morris
Level 15
You provide a single-row collection as the Data. Each field has one value. And then when you make the POST call, the Utility - JSON VBO ends up being used to convert the collection into a JSON string.

For example, you might provide it with this data (The pipes | indicate a separation between fields to make it look like a collection here):
FirstName | LastName | Address | ZipCode
Larry | Stooge | 123 Bakersfield Street | 30021

That collection will get converted to look something like this which will be placed in the body of the message:
{"FirstName":"Larry","LastName":"Stooge","Address":"123 Bakersfield Street","ZipCode":"30021"}

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

View answer in original post

9 REPLIES 9

VinayShetty
Staff
Staff
Hi Archana,

Would the following guide be useful. There is a section on page 4 which enlists a POST call using the Web API configuration tool.
https://portal.blueprism.com/system/files/documents/v6.4%20User%20Guide%20-%20Web%20APIs_2.pdf
25184.pngPlease note this is for V6.4 and above.

------------------------------
Thanks and Kind Regards,
Vinay Shetty
Senior Consultant
Blue Prism

------------------------------

david.l.morris
Level 15
You provide a single-row collection as the Data. Each field has one value. And then when you make the POST call, the Utility - JSON VBO ends up being used to convert the collection into a JSON string.

For example, you might provide it with this data (The pipes | indicate a separation between fields to make it look like a collection here):
FirstName | LastName | Address | ZipCode
Larry | Stooge | 123 Bakersfield Street | 30021

That collection will get converted to look something like this which will be placed in the body of the message:
{"FirstName":"Larry","LastName":"Stooge","Address":"123 Bakersfield Street","ZipCode":"30021"}

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

Hi Vinay,

I'm looking for some blue prism documentation for API services, as right now I'm doing he automation of one financial tool in IBM. Unfortunatelly I'm not able to open the link with pdf file. Can You help me with that.

Thank you in advance

------------------------------
Michal Bezak
------------------------------

Hi Michal,

Could you please check if the following steps assist you :
- Login to the Blue Prism Portal
- Click on the Documents Tab
- In the Search Bar type the keyword - API
- If you scroll through the search results, ideally at the end of the first page there is a guide named as "v6.4 User Guide - Web APIs".

Hopefully this helps. 

Thanks and Kind Regards,
Vinay Shetty

------------------------------
Vinay Shetty
Senior Consultant
Blue Prism
Asia/Kolkata
------------------------------

Hi Team,

I am trying to call  Twilio API to send SMS which post method. I want to send body parameters like To, From, and SMS text. Not sure how to send the body. I'm referring to this document for web API calls. https://bpdocs.blueprism.com/bp-6-10/en-us/z-pdf/web-api/v6.10%20Web%20APIs%20-%20User%20Guide.pdf
25189.png

In parameter 

25190.png

In Process-

25191.png

Its Giving error status code 400 as "21604- A 'To' phone number is required"



------------------------------
Shraddha Joshi
------------------------------

@ShraddhaJoshi2,

From the looks of it you're trying to use the Twilio - Phone Numbers connector. If you want to send SMS's you want to use the SMS Messaging Integration for Twilio which is a different connector. You can find it at the following link:

https://digitalexchange.blueprism.com/dx/entry/9648/solution/twilio---sms-messaging-integration

The Twilio - Phone Numbers connector is an asset for managing phone numbers maintained by the Twilio platform.

Cheers,


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

Hi Eric Wilson, 

I try to update a ticket on EasyVista via an API call  (PUT method) but it does not work, it works very well via PostMan but with the action which I created in my web service I have this error :
Internal : Unexpected error Error during Web API HTTP Request
HTTP
Status Code: 590

HTTP Response Content: {
    "type": "
about:blank",
    "
title": "Internal Easyvista Error",
    "
status": 590,
    "message": "An
internal error occurred.\r\n    Please try again later or contact the system administrator.",
    "
correlationId": "657832bd35275",
    "instance": "/api/v1/50004/actions/S230131_072"
}

You Can
find more explication with picture

25200.png

25201.png



------------------------------
SLIMANE OUZIALA
Consultant
Arondor Capture
Europe/Paris
------------------------------

Hello @SLIMANE OUZIALA,

I'm not familiar with EasyVista or their API, but looking at the online documentation at the following link it seems the end point you're using doesn't match what their documentation says it should be for the Update Ticket PUT method.

https://wiki.easyvista.com/xwiki/bin/view/Documentation/Integration/WebService%20REST/REST%20API%20-%20Update%20an%20incident-request/

They show the action path as /requests/{rfc_number} where rfc_number is the ticket number.

Perhaps if you share some screenshots of the endpoint test you have in Postman, that might help.

Cheers,



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

Hollo Eric, 

First, thank you for you help, 

I use the same doumetation for this action, but for Validate ticket I have to use .../actions/{rfc_number}

the linke is here : https://wiki.easyvista.com/xwiki/bin/view/Documentation/Integration/WebService%20REST/REST%20API%20-%20Finish%20an%20action%20attached%20to%20an%20incident-request/

Here you can find a copy of my Postman request 

25280.png

Thank you for your help.



------------------------------
SLIMANE OUZIALA
Consultant
Arondor Capture
Europe/Paris
------------------------------