Hi @plobo,
Thanks a lot for your reply. We have tried the API mentioned by you but it isn’t releasing the license. Please find below details on the problem statement & solutions explored so far to release Unattended Bot license from workstation with the help of API calls:
Problem Statement: To be able to release the unattended bot license from a workstation & assign the license to a bot running on a different workstation, without accessing workstations to connect / disconnect robots manually. Target is to use a single floating unattended bot license & run the process sequentially from 5 different workstations.
Planned steps for execution:
• Assign license to bot running on Machine 1
• Run the process
• Release license from bot running on Machine 1
• Assign license to bot running on Machine 2
• Run the process
• Release license from bot running on Machine 2
• Repeat the process for 3 more machines.
Assigning & Releasing license needs to be handled either with help of API calls or any other programmatic solution without requiring manual intervention to connect / disconnect robots.
Solutions explored so far: We have explored Orchestrator API calls which allows us to Enable or Disable a Machine, so that the Robots connected to it do not consume NonProduction/Unattended licenses. We also have explored Orchestrator API calls which allows us to Enable or Disable a Robot.
Activity Used: Orchestator HTTP Request
Solution 1–>Enabling or Disabling a Machine:
Relative Endpoint: “/odata/LicensesRuntime(‘MachineName’)/UiPath.Server.Configuration.OData.ToggleEnabled”
JSON Payload:
{
“key”: “MachineName”,
“robotType”: “Unattended”,
“enabled”: false
}
Method: Post
Response:
• Status Code returned by the above request was 200, which suggest that the request was correct & was successfully executed.
• The machine did get disabled as shown in below screenshot but the bot on machine didn’t get disconnected & the license wasn’t released in this case.
• As per API documentation, once a machine is disabled, the Robots connected to it do not consume NonProduction/Unattended licenses. But the license isn’t getting released in this case.
Solution 2–>Enabling or Disabling a Robot Approach:
Relative Endpoint: “/odata/Robots/UiPath.Server.Configuration.OData.ToggleEnabledStatus”
JSON Payload:
{
“robotIds”: [
XXXXXX
],
“enabled”: false
}
Note: ‘XXXXXX’ used in above JSON Payload is the Robot ID
Method: Post
Response:
• Status Code returned by the above request was 200, which suggest that the request was correct & was successfully executed.
• The robot did get disabled as shown in below screenshot
• The bot on machine didn’t get disconnected but shows as Unlicensed. Please refer to below screenshot for more details.
• Even though the bot shows as Unlicensed but the license wasn’t released in this case. If we visit the License page on Orchestrator, we get to see that the Bot status still shows as Active & Licensed. Please refer to below screenshot for more details:
• Bot continues to consume the license until we manually disconnect the Robot / Deactivate the Robot from Orchestrator / stop UiPathRobotService.
It will be of great help if you could help us to release license either with the help of API calls or any other programmatic solution without requiring manual intervention to connect / disconnect robots.
Please let me know if any further information is needed.
Have a great day