Nomad Job Restarts via REST API

In the release notes for 0.9.2 I see we can now restart jobs via the CLI:

Are there any plans to add this functionality to the REST endpoints as well?

2 Likes

Hi,

The Nomad CLI under the hood uses the API for all operations, just been digging into the API documentation to find the restart command and it does appear to be missing from the docs.

I did some digging into the source and have surfaced the API path for restarts for you:

PUT
/v1/client/allocation/<alloc.ID>/restart

I will also check with the team on the API documentation and try to get that updated as soon as possible.

Kind regards,

Nic

There is a PR open for this now, the docs should be merged in a couple of days.

Thanks again for reporting this.

Thank you for the quick response! Iā€™m excited to add this to our CI pipeline.

3 Likes