Error fix for "Asset does not exist" thrown when updating an asset via API the error.
Issue Description: When trying to update an Asset in Orchestrator using the “PUT /odata/Assets({Id})” call, an error message is retrieved: {“message”: “Asset does not exist.”, “errorCode”: 1002, “resourceIds”: null}
Root Cause: This happens when the Asset ID is not specified in the body JSON request.
Resolution: The call to this endpoint must contain the following information
- Authorization: Bearer Token
- Headers: X-UIPATH-OrganizationUnitId : 2549819
Body of type JSON:
To this endpoint, also send a custom body specifying just the relevant information, for example:
{ "Id": 338774, "StringValue": "TestedStringValue", "ValueType": "Text", "Name": "Cloud_Orchestrator_URL_modified", "Description": null, "ValueScope": "Global", "HasDefaultValue": true, "CanBeDeleted": true }
If everything is correct, it should now be possible to modify the Asset and the response code will be 200.
Read more on the Orchestrator API - Assets Request .