Fetching Asset Value Per Robot "The asset does not have a value associated with this robot"

assets
api

#1

When I try the following method via the UIPath Web API… “https://platform.uipath.com/odata/Assets/UiPath.Server.Configuration.OData.GetRobotAsset(robotId=‘robotId’,assetName=‘assetName’)” (obviously I have subbed in my own values) I keep getting thrown the error “{“message”:“The asset does not have a value associated with this robot.”,“errorCode”:1002,“resourceIds”:null}”

This would suggest there is no Robot linked to the asset. However when using UIPath orchestrator I can clearly see that I have two robots linked each with their own value. I have also used the get robots method in the API to confirm that the robot ID I am using is correct.


#2

Although it says it requires the robotId, can you try using the id of the asset you are trying to retrieve?

Are you trying by any chance to edit a Per Robot asset? If so, please use the RobotKey in the RobotId parameter.


#3

I have tried that however I still get the same. When I use the get assets function it doesn’t seem to list any robots under any given asset which leads me to believe the API thinks there aren’t any robots associated with the asset. However,
when I open the Orchestrator UI I can clearly see everything is where it should be.*


#4

To retrieve the RobotKey, you need to do a request similar to this: https://platform.uipath.com/api/RobotsService/GetRobotMappings?licenseKey=‘licenseKey’&machineName=machineName. Please note that the value of the licenseKey parameter has to be placed between quotation marks, while the machineName value should not.

The licenseKey and machineName can be obtained by querying the Robots endpoint.

To retrieve also Robot information for per asset robots, you can use a query similar to this https://platform.uipath.com/odata/Assets?$expand=RobotValues


Trouble using GetRobotAsset api