Update Robot Password Using API

How to update Robot password using API ?

The Robot password can be achieved can be achieved with Patch / Put API by calling /odata/Robots({key}) . Reference can be made Robots Requests - Editing Robot Information.

Prerequisites:

  • The user account with which the request is being authenticated should have edit access
  • In case the Robot settings are set in Orchestrator UI(using settings tab of Robot), then make sure that the parameters already set in the execution settings are also involved in the request body to change the Robot password. Otherwise these settings will be overridden.
The request body should look like below,
{
"Id":3,
"MachineName":"DESKTOP",
"MachineId":4,
"Username":"domain\\username",
"RobotEnvironments":"environment",
"Description":null,
"Type":"Unattended",
"HostingType":"Standard",
"Password":"P@sw0rd",
"Name":"ClassicRobot",
"ExecutionSettings":{"TracingLevel":"Information","LoginToConsole":false,"ResolutionWidth":"1920","ResolutionHeight":"1080","ResolutionDepth":"24"},
"CredentialType":"Default"
}

Note: All the execution settings( resolution height, width and depth) are also being passed in the above request. However, this request is to change the Robot password. This is mandatory if the parameters are set in the Orchestrator UI and retention of those values is required.