PARTNERS - Please join us for our upcoming webinar:
Leveraging Intelligent Recommendations for Operational Transformation.
AMS Partners Click HERE | EMEA/APJ Click HERE

REST UIPath httpParams - CreateAccountJSON

aalvarez_mk
New Contributor III
New Contributor III

Has anyone worked with UIPath to pass in inputArguments as a part of httpParams for the StartJobs endpoint? Sample CrateAccountJSON below. The data passes if we omit inputArguments, but fails when we attempt to use inputArguments. Not sure if single quotes need to be escaped or not.

{
"call": [{
"name": "call1",
"connection": "acctAuth",
"url": "{{environment_base}}/odata/jobs/UiPath.Server.Configuration.OData.StartJobs",
"httpMethod": "POST",
"httpParams": "{\"startInfo\":{\"ReleaseKey\":\"{{release_key}}\",\"Strategy\": \"Specific\",\"RobotIds\": [{{single_robot_id}}], \"Source\": \"Manual\", \"InputArguments\": \"{'in_Login':'Yes','in_TestVar1':'Test','in_TestVar2':'User1}}",
"httpHeaders": {
"Authorization": "${access_token}"

},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [201]
}
}]
}

4 REPLIES 4

nimitdave
Saviynt Employee
Saviynt Employee

Please try once with below:

{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "{{environment_base}}/odata/jobs/UiPath.Server.Configuration.OData.StartJobs",
"httpMethod": "POST",
"httpParams": "{\"startInfo\": {\"ReleaseKey\": \"{{release_key}}\",\"Strategy\": \"Specific\",\"RobotIds\": [\"{{single_robot_id}}\"],\"Source\": \"Manual\",\"InputArguments\": {\"in_Login\": \"Yes\",\"in_TestVar1\": \"Test\",\"in_TestVar2\": \"User1\"}}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
}
]
}

aalvarez_mk
New Contributor III
New Contributor III

I actually looked at the logs, and Saviynt is converting the single quotes to what you have provided. So I'm not sure that is the issue or not.

nimitdave
Saviynt Employee
Saviynt Employee

{{release_key}} and {{single_robot_id}} are just place holders in the shared json or are the present in actual json. If its present in actual jsons also then how are you getting values in them populated while connector invokes the url.

Also did you try the shared json and getting same issue.?

 

Vedanth_BK
Saviynt Employee
Saviynt Employee

Hi @aalvarez_mk ,

Analyzing the JSON, I see that there are discrepancies in the number of opened and closed braces. Can you please check?
Also, UIPath is available under the Saviynt Exchange platform. Please check out the link for more information.

Thank you 
Vedanth B.K