How to automatically update a package in UiPath Orchestrator?
Issue Description
This article describes how to update a package in UiPath Orchestrator automatically.
Resolution
The packages that were published to the Orchestrator may be updated manually from the Orchestrator UI, through API calls.
References
- Managing processes from the Orchestrator UI
- Orchestrator API calls: https://YOUR_ORCHESTRATOR_HOSTNAME/swagger/index.html and https://docs.uipath.com/automation-cloud/docs/setting-up-the-external-application
To update a package with API calls, follow the below steps:
- Extract the ReleaseId of your package/packages by using the below API call (the Id of the package from the obtained results is the ReleaseId):
- Method: GET
- URL: https://YOUR_ORCHESTRATOR_HOSTNAME/odata/Releases
- Authorization: Bearer + token
- Headers:
- Accept: application/json
- X-UIPATH-OrganizationUnitId: FOLDER_ID
- Choose one of the methods below:
-
- Approach#1 -> For individual packages
- Method: POST
- URL: https://YOUR_ORCHESTRATOR_HOSTNAME/odata/Releases(RELEASE_ID_OF_THE_PACKAGE)/UiPath.Server.Configuration.OData.UpdateToLatestPackageVersion?mergePackageTags=false
- Authorization: Bearer + token
- Headers:
- X-UIPATH-OrganizationUnitId: FOLDER_ID
- Content-Type: application/json
- Accept: application/json
- Approach#2 -> For multiple packages at once
- Method: POST
- URL: https://YOUR_ORCHESTRATOR_HOSTNAME/Releases/UiPath.Server.Configuration.OData.UpdateToLatestPackageVersionBulk
- Authorization: Bearer + token
- Headers:
- X-UIPATH-OrganizationUnitId: FOLDER_ID
- Content-Type: application/json
- Accept: application/json
- Body as JSON type:
- {"releaseIds":[RELEASE_ID_OF_THE_PACKAGE_1,RELEASE_ID_OF_THE_PACKAGE_2,...],"mergePackageTags":true}
- Approach#1 -> For individual packages