API for rerunning oozie jobs

We want to automate a very simple instruction the we currently do by hand through HUE:

in Oozie Job Browser, go through running Schedules, find any Killed workflow, click on it, select “Rerun -> All or skip successful -> Submit”.

The straightforward way would be doing that directly through oozie, but it would require playing around with the right config files and storing the run states somewhere.

An alternative question – maybe it would be possible (and much simpler) to just automate the calls through HUE’s API?

There is no off the bat REST API for this (or need to reverse engineer the calls made by the UI), but it might be not that bad to do it via the Python shell: https://docs.gethue.com/developer/api/python/

1 Like

Thanks, will look into it! A straightforward alternative could be pulling a Selenium instance to do the clicking, but Python shell sounds lighter and quicker.