cancel
Showing results for 
Search instead for 
Did you mean: 

REST API Put (Data collection)

DennisLaursen
Level 4
I want to use the "Webservices - REST" Put-functionality to interact with a database. The PUT method require the following inputs: - Address URL (Text) - Data (Collection) - HTTP username (Text) - HTTP password (Password) The despription for the data-input says the following: "The data to be passed to the REST API." But I am not entirely sure of what that means. Because I only want to change one data input with the PUT, and that I do with the Address URL request. So what data input should I more specific put here? Because if I run the step without this data input, the following error message appears: "Internal : Could not execute code stage because exception thrown by code stage: An object of the type 'System.String' cannot be converted into the type 'System.Data.DataTable'." But when I run the PUT action stage, the requested PUT-action is executed as I wanted, in spite of the error message, and that the stage fails. So what can I make as a data collection input? I have tried to generate a Collection with a "GET --> ShowTask", and paste this into the PUT action stage. But this doesn't help.
2 REPLIES 2

TusharVarshney
Level 5
@Dennis Laursen - As put request is used to update/Replace the value of any attribute, A field attribute is required to pass as JSON body.​

------------------------------
Tushar Varshney
Senior Consultant - Intelligent Automation
Ernst & Young India
+91-9880188366
------------------------------
Tushar Varshney Senior Consultant - Intelligent Automation Ernst & Young India +91-9880188366

bruce.liu
Staff
Staff
Hi Dennis,

Try to supply it with a blank collection stage.

------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------