Oms API DELETE job history state - openmpp/openmpp.github.io GitHub Wiki

DELETE state of model run job from history.

There are 3 method to delete a history records of model run job:

  • delete a single job history record by specific model run submission time stamp
  • delete all history records of successfuly completed jobs
  • delete all history records of jobs which are not completed successfuly

It does NOT delete actual model run data, output tables and run parameters are NOT deleted from database. Only history record of model run job is deleted.

Methods:

DELETE /api/service/job/delete/history/:job

DELETE /api/service/job/delete/history-all-success
DELETE /api/service/job/delete/history-all-not-success

Arguments:

:job - (required) model run submission time stamp

Call examples:

Delete a history record of job 2022_09_13_23_20_50_995:

curl -v -X DELETE http://localhost:4040/api/service/job/delete/history/2022_09_13_23_20_50_995

*   Trying 127.0.0.1:4040...
* Connected to localhost (127.0.0.1) port 4040 (#0)
> DELETE /api/service/job/delete/history/2022_09_13_23_20_50_995 HTTP/1.1
> Host: localhost:4040
> User-Agent: curl/7.83.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Location: /api/service/job/delete/history/2022_09_13_23_20_50_995
< Date: Wed, 14 Sep 2022 03:24:17 GMT
< Content-Length: 0

Delete all history records of successfuly completed jobs:

curl -v -X DELETE http://localhost:4040/api/service/job/delete/history-all-success

*   Trying [::1]:4040...
* Connected to localhost (::1) port 4040
> DELETE /api/service/job/delete/history-all-success HTTP/1.1
> Host: localhost:4040
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Location: /api/service/job/delete/history-all/4
< Date: Sat, 04 May 2024 01:13:52 GMT
< Content-Length: 0

Delete all history records of jobs which are not completed successfuly:

curl -v -X DELETE http://localhost:4040/api/service/job/delete/history-all-not-success

*   Trying [::1]:4040...
* Connected to localhost (::1) port 4040
> DELETE /api/service/job/delete/history-all-not-success HTTP/1.1
> Host: localhost:4040
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Location: /api/service/job/delete/history-all-not-success/0
< Date: Sat, 04 May 2024 01:20:30 GMT
< Content-Length: 0
⚠️ **GitHub.com Fallback** ⚠️