Hello,
Is there any orchestrator API call to enable/disable orchestrator triggers ?
Hello,
Is there any orchestrator API call to enable/disable orchestrator triggers ?
Yes. There is a way to do it.
HTTP request
Step 1
Get bearer token
Step 2
Get trigger details(Will need their trigger ID’s)
Step 3
Update Trigger(Need to use Trigger ID as reference)
Import to postman to see available API calls
Use those details in Http request in uipath
Thanks for the reply. but I don’t find any API calls related to triggers. Could you share some link to the exact documentation ?
Hey @akshay616
What type of UiPath Orchestrator you are using, Cloud or on-premise?
Hi,
@Etienne_Vahrmeijer @MohammadAljaafreh
I’m trying to cerate an API that would enable triggers incase they are automatically shut off.
Where would I be able to find the trigger ID’s ?
You need to check these trigger endpoints:
https://cloud.uipath.com/your_org_name/your_tenant_name/orchestrator_/swagger/index.html#/ProcessSchedules
An example for creating a trigger can be found here Orchestrator trigger run - #4 by marian.platonov
If you need to find the Id of a trigger, perform a GET request for
https://cloud.uipath.com/your_org_name/your_tenant_name/orchestrator_/odata/ProcessSchedules?$top=1000&$orderby=Name%20asc
Headers:
Authorization: Bearer + access_token
Accept: application/json
x-uipath-organizationunitid: FOLDER_ID
To enable a trigger:
Method: POST
URL: https://cloud.uipath.com/your_org_name/your_tenant_name/orchestrator_/odata/ProcessSchedules/UiPath.Server.Configuration.OData.SetEnabled
Headers:
Authorization: Bearer + access_token
Accept: application/json
x-uipath-organizationunitid: FOLDER_ID
Body of type JSON:
{"scheduleIds":[TRIGGER_ID],"enabled":true}
To disable a trigger:
Method: POST
URL: https://cloud.uipath.com/your_org_name/your_tenant_name/orchestrator_/odata/ProcessSchedules/UiPath.Server.Configuration.OData.SetEnabled
Headers:
Authorization: Bearer + access_token
Accept: application/json
x-uipath-organizationunitid: FOLDER_ID
Body of type JSON:
{"scheduleIds":[TRIGGER_ID],"enabled":false}
I’ve done as you’ve described and it returns succesful with:
“@odata.context”: “UiPath”,
“value”: true
But my trigger doesn’t enable / disable??
(The link is actually a longer string, i can’t format it, it seems…)