How to automatically release the Orchestrator license?
Using REST API to toggle the license to enabled/disabled
- Access Swagger (in the Orchestrator URL, add /swagger at the end - example: https://cloud.uipath.com/flowerz/DefaultTenant/orchestrator_/swagger)
- In Swagger, go to LicensesRuntime > POST /odata/LicensesRuntime('Modern_MachineTemplate')/UiPath.Server.Configuration.OData.ToggleEnabled
3. In the Key string field, add the *Machine Name (see below section How to get the machine name and key).
4. Once the key string was added, click Try it out! to display the body as well.
5. In the Body, *replace the key with the one from /odata/LicensesRuntime/UiPath.Server.Configuration.OData.GetLicensesRuntime
In the end, the request to disable/release the license should look like the below one:
{
"key": "UIPATH\\FLORENTINA.ANTONESCU@Modern_MachineTemplate@LAPTOP-H9T5GN9R",
"robotType": "Unattended",
"enabled": false
}
6. To enable the license, edit the Body by adding "enabled": true and click Execute. This will enable the license in the Orchestrator UI.
*How to get the machine name and key:
Get the correct machine name from LicensesRuntime > GET /odata/LicensesRuntime/UiPath.Server.Configuration.OData.GetLicensesRuntime, where you add the Robot Type (Unattended, NonProduction, etc.) and Execute.
Next, in the response body, the machine name and key will be shown.