Oms API POST delete multiple worksets - openmpp/openmpp.github.io GitHub Wiki
Delete multiple worksets and workset parameter(s) values from database.
Workset is a set of model input parameters (a.k.a. "scenario" input). Workset can be used to run the model.
Method:
POST /api/model/:model/delete-worksets
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 workset names to delete, for example:
[
"modelOne_partial",
"modelOne_other"
]
Workset is uniquely identified by name (inside the model). Different models can have worksets with same name, i.e. each model can have workset with name "Default".
Call example:
curl -v -X POST -H "Content-Type: application/json" http://localhost:4040/api/model/modelOne/delete-worksets -d @del_m1_ws_lst.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-worksets HTTP/1.1
> Host: localhost:4040
> User-Agent: curl/8.4.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 96
>
< HTTP/1.1 200 OK
< Content-Location: /api/model/modelOne//delete-worksets/2
< Content-Type: text/plain
< Date: Wed, 24 Jan 2024 04:49:52 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact