Hi , I am trying to use Orchestrator API to kill jobs with Pending Status so they wont run. But I am not able to do this. I first did a “GET JOB” API to get list of pending Jobs. Then I used one of the Job`s Id to run a stop Job Action : /odata/Jobs({Id})/UiPath.Server.Configuration.OData.StopJob
Request Body :
{
“strategy”: “Kill”
}
But this is giving me 400 Response code. The User Id that I am using have the Edit permission on the Jobs as well. Can you please confirm if we are not able to use the StopJob action to kill a pending Job, and is there any way using Orchestrator API that we can stop or kill Pending Jobs.
Hi Gaurav, I tried earlier with invoking API from code for the StopJobs Action, and it was not working. But now when I checked from Swagger the Stopjobs Action, it is working and I am able to kill jobs. So it may be some error in the format of my request. Thank you so much Gaurav.