Setting the robot password using odata/Robots


#1

Hi

I am trying to set the password of a robot using the rest API odata/Robots(id). According the the documentation the required fields are:

Path params

  • ID

Body Params

  • LicenseKey

  • MachineName

  • Name

  • Type

So in powershell I use the invoke rest method using PUT with the body set to
{
“LicenseKey”: “key inserted here”,
“MachineName”: “name4001”,
“Name”: “QARobot-4001”,
“Type”: “NonProduction”,
“Password”: “String”,
}

And I get an error saying “Username is required if the password is set”

So I add the Username

{
“LicenseKey”: “key inserted here”,
“MachineName”: “name4001”,
“Name”: “QARobot-4001”,
“Username”: “Domain\Username”
“Type”: “NonProduction”,
“Password”: “String”,
}
And now I get the error "robot does not exist’

But if i use the get command with the odata/Robots(id) for the robot in question the information for the robot is returned and I have specified it correctly.

What am I doing wrong?

Cheers

David


#2

Ok so it looks like you need to specify the ID of the robot in the JSON body aswell as in the URL :frowning: Looks like the doco needs an update :slight_smile: