Create Asset per Robot over Orchestrator API

orchestrator

#1

I want to write a Java program which creates Assets per Robot over UiPath Orchestrator API.
https://www.uipath.com/hubfs/Documentation/OrchestratorAPIGuide_2016.2/UiPathOrchestratorAPIGuide_2016.2.html
I used AssetDto with AssetRobotValueDto.
My Body is : { “Name”: “OrchestratorTest”, “CanBeDeleted”: true, “ValueScope”: “PerRobot”, “ValueType”: “Text”, “Value”: “[Value per robot]”, “StringValue”: “”, “BoolValue”: false, “IntValue”: 0, “RobotValues”:[{ “RobotId”: “30”, “ValueType”: “Text”, “StringValue”: “test19”, “BoolValue”: false, “IntValue”: 0, “CredentialUsername”: “”, “CredentialPassword”: “”}]}
And I make a POST Request with this https URL:
https://staging.uipath.com/odata/Assets
I substituted staging.uipath.com with my Servername

When I make this Request I get:
java.io.IOException: Server returned HTTP response code: 500 for URL: https://staging.uipath.com/odata/Assets
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at webAPIActions.Asset.defineAssetPerRobot(Asset.java:799)
at webAPIActions.Asset.createAssetPerRobot(Asset.java:225)
at webAPIActions.Asset.createOrUpdateAsset(Asset.java:544)
at access.OrchestratorActions.main(OrchestratorActions.java:29)


#2

Are you on the same version? @qateam


#3

Solved: RobotId is from Typ Integer but I delivered as a String so there an error appears!