Oms API POST download model workset initiate - openmpp/openmpp.github.io GitHub Wiki

POST model workset download request: server will prepare model workset data for download.

This method only avaliable if server configured to create downloads for user.

This is a beta version and may change in the future.

Workset is a set of model input parameters (a.k.a. "scenario" input). Workset can be used to run the model.

As result of this call oms service will create:

  • download archive, for example: RiskPaths.set.Default.zip
  • model workset .csv files for parameters and output tables in RiskPaths.set.Default folder
  • model workset .json metadata files

Method:

POST /api/download/model/:model/workset/:set

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.

:set - (required) workset name

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".

Form body

Posted form can include optional JSON body:

{
  "Utf8BomIntoCsv": true
}

Use "Utf8BomIntoCsv": true option to start CSV files with Byte Order Mark. Byte order mark may be neccessary for some programs (e.g. Microsoft Excel) to correctly process UTF-8 files.

Call examples:

curl -v -X POST -H "Content-Type: application/json" http://localhost:4040/api/download/model/RiskPaths/workset/Default
curl -v -X POST -H "Content-Type: application/json" http://localhost:4040/api/download/model/c87bd08cc86da61332336384a491203b/workset/Default

curl -v -X POST -H "Content-Type: application/json" http://localhost:4040/api/download/model/RiskPaths/workset/Default -d @options.json
⚠️ **GitHub.com Fallback** ⚠️