ym1198
ym119813mo ago

Which rest api to use for re-running a failed flow-run

My usecase is if some flow-run gets failed in production workspace (which i dont have access to) due to 3rd party rate limiting issue. We want to run that job again by clicking on "Run again" But since i dont have access to that workspace, i cannot run that again. And senior have to run that. Since they are busy, can i run that script by using the unique run-id of that run with rest api ? If yes, please let me know the rest api for re-running a particular flow. PS- dont what to run that script but that particular run instance of that script so input remains same
7 Replies
ym1198
ym119813mo ago
@rubenf please check
rubenf
rubenf13mo ago
you can't without access to the workspace
ym1198
ym119813mo ago
i will have token of the user who has access to that workspace still i cannot ?
ym1198
ym119813mo ago
so it will like that user is running but i will via postman instead of windmill console https://app.windmill.dev/openapi.html#/operations/runFlowByPath#Query-Parameters job_id here means the flow-run id ? No no ,it means what i want to assign to that new job So i cannot find "Run again" api in above list Like i told , i dont want to run the script/flow (for which apis exists), i want to run that run instance again @rubenf there is no api for this i checked the Frontend flow also whenever "Run again", cta is called, a normal run api is called (like it is called for first time), and the payload is passed again from frontend. I thought there was a different api which just by job-id would call that script/flow again with same payload as of earlier one (instead of passing again)
Tiago Serafim
Tiago Serafim13mo ago
Use this API https://app.windmill.dev/openapi.html#/operations/listCompletedJobs , filtering to get the job you want, get the args from the result and use the API to run a script/flow. AFAIK, each job is unique, you can't re-run the same instance.
ym1198
ym119813mo ago
@Tiago Serafim this is a good workaround, thanks!