Oms API POST jobs all pause - openmpp/openmpp.github.io GitHub Wiki
POST a request to pause or to resume model runs queue processing for all oms instances
This method is pausing or resuming jobs queue processing for all oms
web-service instances.
For example if there are 3 web-services: localhost:5050
, localhost:4040
, localhost:3030
are sharing the same job queue then:
curl -v -X POST http://localhost:4040/api/admin-all/jobs-pause/TRUE
would pause jobs from all 3 web-services, not only from localhost:4040
.
This is a beta version and may change in the future.
Method:
POST /admin-all/jobs-pause/:pause
Arguments:
:pause - (required) boolean value to pause or resume model runs queue processing.
It must be one of: 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False. Any other value returns an error.
Call examples:
curl -v -X POST http://localhost:4040/api/admin-all/jobs-pause/true
curl -v -X POST http://localhost:4040/api/admin-all/jobs-pause/1
curl -v -X POST http://localhost:4040/api/admin-all/jobs-pause/0
curl -v -X POST http://localhost:4040/api/admin-all/jobs-pause/false
Example:
curl -v -X POST http://localhost:4040/api/admin-all/jobs-pause/true
* Trying 127.0.0.1:4040...
* Connected to localhost (127.0.0.1) port 4040 (#0)
> POST /api/admin-all/jobs-pause/true HTTP/1.1
> Host: localhost:4040
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Location: /api/admin-all/jobs-pause/true
< Content-Type: text/plain
< Date: Fri, 04 Aug 2023 00:01:31 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact