Skip to content

Oms API POST delete runs

amc1999 edited this page Jan 24, 2024 · 1 revision

Delete multiple model runs from database, including output table values, input parameters and microdata.

Method:

POST /api/model/:model/delete-runs

This method is asynchronous: it starts runs delete return a response immediately. You need to check the results later by using GET list of model runs or other methods to make sure model runs are deleted and no longer exist in the list of model runs.

Arguments:

:model - (required) model digest or model name

Model can be identified by digest or by model name. It is recommended to use digest because it is uniquely identifies model. It is possible to use model name, which is more human readable than digest, but if there are multiple models with same name in database than result is undefined.

JSON body request:

Array of model run digests, run stamps or run names, for example:

[
  "ae4546791da1b828a4fe0c0ca0935e7a",
  "2023_12_29_23_46_19_255",
  "First Task Run_modelOne_other",
  "Task Run with Suppressed Tables_modelOne_other"
]

Model run can be identified by run digest, run stamp or run name. It is recommended to use digest because it is uniquely identifies model run. Run stamp, if not explicitly specified as model run option, automatically generated as timestamp string, ex.: 2016_08_17_21_07_55_123. It is also possible to use name, which is more human readable than digest, but if there are multiple runs with same name in database than result is undefined.

Call example:

curl -v -X POST -H "Content-Type: application/json" http://localhost:4040/api/model/modelOne/delete-runs -d @del_m1_runs.json

Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying [::1]:4040...
* Connected to localhost (::1) port 4040
> POST /api/model/modelOne/delete-runs HTTP/1.1
> Host: localhost:4040
> User-Agent: curl/8.4.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 172
>
< HTTP/1.1 200 OK
< Content-Location: /api/model/modelOne/delete-runs/4
< Content-Type: text/plain
< Date: Wed, 24 Jan 2024 04:02:54 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact

Home

Getting Started

Model development in OpenM++

Using OpenM++

Model Development Topics

OpenM++ web-service: API and cloud setup

Using OpenM++ from Python and R

Docker

OpenM++ Development

OpenM++ Design, Roadmap and Status

OpenM++ web-service API

GET Model Metadata

GET Model Extras

GET Model Run results metadata

GET Model Workset metadata: set of input parameters

Read Parameters, Output Tables or Microdata values

GET Parameters, Output Tables or Microdata values

GET Parameters, Output Tables or Microdata as CSV

GET Modeling Task metadata and task run history

Update Model Profile: set of key-value options

Update Model Workset: set of input parameters

Update Model Runs

Update Modeling Tasks

Run Models: run models and monitor progress

Download model, model run results or input parameters

Upload model runs or worksets (input scenarios)

Download and upload user files

User: manage user settings

Model run jobs and service state

Administrative: manage web-service state

Clone this wiki locally