Unable to enable or disable machine via Orchestrator Web API

I’ve tried to invoke Orchestrator Rest API below to disable the machine license as following diagram but seems like not work by putting the robot name into “Documentation” in the API url and body. Its return status 200 OK but i check from Orchestrator Portal did not take any effect.

https://platform.uipath.com/odata/LicensesRuntime(‘**Documentation**’)/UiPath.Server.Configuration.OData.ToggleEnabled and provide the body
{
“key”: “Documentation”,
“robotType”: “Unattended”,
“enabled”: false
}

Is anyone have any idea regards this api is not work?

Thank you!

Hi @NykieLau

Welcome to our UiPath Forum! :slight_smile:

Are you authenticated with the user who has sufficient permissions to make this change? (I know it’s weird enough, as it should give a different status code anyway).

Also, what are the versions of your Robot and Orchestrator?

Hi @NykieLau,

I am trying to solve exactly the same solution.

Could you be able to solve your issue?

Could you please provide the details of your api request structure? Or is there any reference you looked up for information?

If you are still having this issue, please let us be in contact and try to cooperate.

Best regards,

Problem solved. Just enter the robotname replaced the “Documentation” keyword.

https://platform.uipath.com/odata/LicensesRuntime(‘ RobotName ’)/UiPath.Server.Configuration.OData.ToggleEnabled and provide the body
{
“key”: “ RobotName ”,
“robotType”: “Unattended”,
“enabled”: false
}

1 Like

Hi @NykieLau,

Thank you very much for your response. It was really helpful. Indeed we are able to succesfully get the response.

But the reponse was an error, which is below:
Cannot overwrite variable Error because it is read-only or constant.

Did you also receive this error? How did you manage changing a read-only variable?

Best regards,
Umut Alihan Dikel

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.