I am trying to edit user for unattended robot in on-premise uipath orchstrator using below python script:
orchestrator_public_url = “https://my-desktop”
url = orchestrator_public_url + “/odata/Users”
payload={}
headers = {
‘Content-Type’: ‘application/json’,
“Authorization”: auth
}
response = requests.request(“GET”, url, headers=headers, data=payload, verify=False)
response1 = json.loads(response.content)
key = response1[‘value’][0][‘Id’]
user_url = orchestrator_public_url + “odata/Users(”+ str(key)+“)”
user_payload = json.dumps({
“UserName”: “admin”,
“Name”: “admin”,
“UnattendedRobotDto”: {
“UserName”: “xxxxxxxx”,
“Password”: “xxxxxx”
}
})
user_headers = {
‘Content-Type’: ‘application/json’,
“Authorization”: auth
}
r = requests.request(“PUT”, user_url, headers=asset_headers, data=asset_payload, verify=False)
In response, I got the <Response[404]>
Kindly support on the same.
Thanks in advance.