I have some jobs that are faulted, but need to be restarted. So I’m using the Orchestrator API to find out which jobs are faulted, filter out the jobs that need to be restarted (they have specific errors).
Then for the final check, I will search for the last job ran on the system on the same account, same process and same folder. If the ID is the same as the faulted job, I know for sure that the last job is faulted. If there is a difference, then the time triggers, my colleague or myself have already restarted that job.
The rest of the jobs do I restart with the following api:
/odata/Jobs/UiPath.Server.Configuration.OData.RestartJob
The only problem I saw is that it runs on a different account. I expected that a restart would work the same as when I click in the orchestrator on restart, but that is not the case.
How can I restart a job? Or do I need to use
/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs and add all the information manual to it?