Oms web service API

From OpenM++
Jump to: navigation, search

Contents

Arguments for web-service methods

:model - model digest or model name 
:lang  - language code 
:run   - model run digest or run name 
:set   - name of workset (input set of model parameters)

See more details: about web-service arguments.

GET Model Metadata

GET model list

GET /api/model-list

GET model list including text (description and notes)

GET /api/model-list-text?lang=en
GET /api/model-list-text
GET /api/model-list/text
GET /api/model-list/text/lang/:lang

GET model definition metadata

GET /api/model?model=modelNameOrDigest
GET /api/model/:model

GET model metadata including text (description and notes)

GET /api/model-text?model=modelNameOrDigest&lang=en
GET /api/model/:model/text
GET /api/model/:model/text/lang/:lang

GET model metadata including text in all languages

GET /api/model-text-all?model=modelNameOrDigest
GET /api/model/:model/text/all


GET Model Extras

GET model languages

GET /api/lang-list?model=modelNameOrDigest
GET /api/model/:model/lang-list

GET model language-specific strings

GET /api/word-list?model=modelNameOrDigest&lang=en
GET /api/model/:model/word-list
GET /api/model/:model/word-list/lang/:lang

GET model groups of parameters and output tables

GET /api/model-group?model=modelNameOrDigest
GET /api/model/:model/group

GET model groups including text (description and notes)

GET /api/model-group-text?model=modelNameOrDigest&lang=en
GET /api/model/:model/group/text
GET /api/model/:model/group/text/lang/:lang

GET model groups including text in all languages

GET /api/model-group-text-all?model=modelNameOrDigest
GET /api/model/:model/group/text/all

GET model profile

GET /api/model-profile?model=modelNameOrDigest&profile=profileName
GET /api/model/:model/profile/:profile


GET Model Run results metadata

GET list of model runs

GET /api/run-list?model=modelNameOrDigest
GET /api/model/:model/run-list

GET list of model runs including text (description and notes)

GET /api/run-list-text?model=modelNameOrDigest&lang=en
GET /api/model/:model/run-list/text
GET /api/model/:model/run-list/text/lang/:lang

GET status of model run

GET /api/run-status?model=modelNameOrDigest&run=runNameOrDigest
GET /api/model/:model/run/:run/status

GET status of first model run

GET /api/run-first-status?model=modelNameOrDigest
GET /api/model/:model/run/status/first

GET status of last model run

GET /api/run-last-status?model=modelNameOrDigest
GET /api/model/:model/run/status/last

GET status of last completed model run

GET /api/run-last-completed-status?model=modelNameOrDigest
GET /api/model/:model/run/status/last/completed

GET model run including text (description and notes)

GET /api/run-text?model=modelNameOrDigest&run=runNameOrDigest&lang=en
GET /api/model/:model/run/:run/text
GET /api/model/:model/run/:run/text/lang/:lang

GET model run including text in all languages

GET /api/run-text-all?model=modelNameOrDigest&run=runNameOrDigest
GET /api/model/:model/run/:run/text/all

GET last completed model run including text (description and notes)

GET /api/run-last-completed-text?model=modelNameOrDigest&lang=en
GET /api/model/:model/run/last/completed/text
GET /api/model/:model/run/last/completed/text/lang/:lang

GET last completed model run including text in all languages

GET /api/run-last-completed-text-all?model=modelNameOrDigest
GET /api/model/:model/run/last/completed/text/all


GET Model Workset metadata: set of input parameters

GET list of model worksets

GET /api/workset-list?model=modelNameOrDigest
GET /api/model/:model/workset-list

GET list of model worksets including text (description and notes)

GET /api/workset-list-text?model=modelNameOrDigest&lang=en
GET /api/model/:model/workset-list/text
GET /api/model/:model/workset-list/text/lang/:lang

GET workset status

GET /api/workset-status?model=modelNameOrDigest&set=setName
GET /api/model/:model/workset/:set/status
GET /api/model/:model/workset/:set

GET model default workset status

GET /api/workset-default-status?model=modelNameOrDigest
GET /api/model/:model/workset/status/default

GET workset including text (description and notes)

GET /api/workset-text?model=modelNameOrDigest&set=setName
GET /api/workset-text?model=modelNameOrDigest&set=setName&lang=en
GET /api/model/:model/workset/:set/text
GET /api/model/:model/workset/:set/text/lang/:lang

GET workset including text in all languages

GET /api/workset-text-all?model=modelNameOrDigest&set=setName
GET /api/model/:model/workset/:set/text/all

Read Parameters or Output Tables values

Read parameter values from workset

POST /api/model/:model/workset/:set/parameter/value

Read parameter values from workset (enum id's)

POST /api/model/:model/workset/:set/parameter/value-id

Read parameter values from model run

POST /api/model/:model/run/:run/parameter/value

Read parameter values from model run (enum id's)

POST /api/model/:model/run/:run/parameter/value-id

Read output table values from model run

POST /api/model/:model/run/:run/table/value

Read output table values from model run (enum id's)

POST /api/model/:model/run/:run/table/value-id


GET Parameters or Output Tables values

GET parameter values from workset

GET /api/workset-parameter-value?model=modelNameOrDigest&set=setName&name=parameterName
GET /api/workset-parameter-value?model=modelNameOrDigest&set=setName&name=parameterName&start=0
GET /api/workset-parameter-value?model=modelNameOrDigest&set=setName&name=parameterName&start=0&count=100
GET /api/model/:model/workset/:set/parameter/:name/value
GET /api/model/:model/workset/:set/parameter/:name/value/start/:start
GET /api/model/:model/workset/:set/parameter/:name/value/start/:start/count/:count

GET parameter values from model run

GET /api/run-parameter-value?model=modelNameOrDigest&run=runNameOrDigest&name=parameterName
GET /api/run-parameter-value?model=modelNameOrDigest&run=runNameOrDigest&name=parameterName&start=0
GET /api/run-parameter-value?model=modelNameOrDigest&run=runNameOrDigest&name=parameterName&start=0&count=100
GET /api/model/:model/run/:run/parameter/:name/value
GET /api/model/:model/run/:run/parameter/:name/value/start/:start
GET /api/model/:model/run/:run/parameter/:name/value/start/:start/count/:count

GET output table expression(s) from model run

GET /api/run-table-expr?model=modelNameOrDigest&run=runNameOrDigest&name=salarySex
GET /api/run-table-expr?model=modelNameOrDigest&run=runNameOrDigest&name=salarySex&start=0
GET /api/run-table-expr?model=modelNameOrDigest&run=runNameOrDigest&name=salarySex&start=0&count=100
GET /api/model/:model/run/:run/table/:name/expr
GET /api/model/:model/run/:run/table/:name/expr/start/:start
GET /api/model/:model/run/:run/table/:name/expr/start/:start/count/:count

GET output table accumulator(s) from model run

GET /api/run-table-acc?model=modelNameOrDigest&run=runNameOrDigest&name=salarySex
GET /api/run-table-acc?model=modelNameOrDigest&run=runNameOrDigest&name=salarySex&start=0
GET /api/run-table-acc?model=modelNameOrDigest&run=runNameOrDigest&name=salarySex&start=0&count=100
GET /api/model/:model/run/:run/table/:name/acc
GET /api/model/:model/run/:run/table/:name/acc/start/:start
GET /api/model/:model/run/:run/table/:name/acc/start/:start/count/:count

GET output table all accumulators from model run

GET /api/run-table-all-acc?model=modelNameOrDigest&run=runNameOrDigest&name=salarySex
GET /api/run-table-all-acc?model=modelNameOrDigest&run=runNameOrDigest&name=salarySex&start=0
GET /api/run-table-all-acc?model=modelNameOrDigest&run=runNameOrDigest&name=salarySex&start=0&count=100
GET /api/model/:model/run/:run/table/:name/all-acc
GET /api/model/:model/run/:run/table/:name/all-acc/start/:start
GET /api/model/:model/run/:run/table/:name/all-acc/start/:start/count/:count


GET Parameters or Output Tables values as CSV

GET csv parameter values from workset

GET /api/workset-parameter-csv?model=modelNameOrDigest&set=setName&name=parameterName&bom=true
GET /api/model/:model/workset/:set/parameter/:name/csv
GET /api/model/:model/workset/:set/parameter/:name/csv-bom

GET csv parameter values from workset (enum id's)

GET /api/workset-parameter-csv-id?model=modelNameOrDigest&set=setName&name=parameterName&bom=true
GET /api/model/:model/workset/:set/parameter/:name/csv-id
GET /api/model/:model/workset/:set/parameter/:name/csv-id-bom

GET csv parameter values from model run

GET /api/run-parameter-csv?model=modelNameOrDigest&run=runNameOrDigest&name=parameterName&bom=true
GET /api/model/:model/run/:run/parameter/:name/csv
GET /api/model/:model/run/:run/parameter/:name/csv-bom

GET csv parameter values from model run (enum id's)

GET /api/run-parameter-csv-id?model=modelNameOrDigest&run=runNameOrDigest&name=parameterName&bom=true
GET /api/model/:model/run/:run/parameter/:name/csv-id
GET /api/model/:model/run/:run/parameter/:name/csv-id-bom

GET csv output table expressions from model run

GET /api/run-table-expr-csv?model=modelNameOrDigest&run=runNameOrDigest&name=tableName&bom=true
GET /api/model/:model/run/:run/table/:name/expr/csv
GET /api/model/:model/run/:run/table/:name/expr/csv-bom

GET csv output table expressions from model run (enum id's)

GET /api/run-table-expr-csv-id?model=modelNameOrDigest&run=runNameOrDigest&name=tableName&bom=true
GET /api/model/:model/run/:run/table/:name/expr/csv-id
GET /api/model/:model/run/:run/table/:name/expr/csv-id-bom

GET csv output table accumulators from model run

GET /api/run-table-acc-csv?model=modelNameOrDigest&run=runNameOrDigest&name=tableName&bom=true
GET /api/model/:model/run/:run/table/:name/acc/csv
GET /api/model/:model/run/:run/table/:name/acc/csv-bom

GET csv output table accumulators from model run (enum id's)

GET /api/run-table-acc-csv-id?model=modelNameOrDigest&run=runNameOrDigest&name=tableName&bom=true
GET /api/model/:model/run/:run/table/:name/acc/csv-id
GET /api/model/:model/run/:run/table/:name/acc/csv-id-bom

GET csv output table all accumulators from model run

GET /api/run-table-all-acc-csv?model=modelNameOrDigest&run=runNameOrDigest&name=tableName&bom=true
GET /api/model/:model/run/:run/table/:name/all-acc/csv
GET /api/model/:model/run/:run/table/:name/all-acc/csv-bom

GET csv output table all accumulators from model run (enum id's)

GET /api/run-table-all-acc-csv-id?model=modelNameOrDigest&run=runNameOrDigest&name=tableName&bom=true
GET /api/model/:model/run/:run/table/:name/all-acc/csv-id
GET /api/model/:model/run/:run/table/:name/all-acc/csv-id-bom

Update Model Workset: set of input parameters

POST update workset read-only status

POST /api/workset-readonly?model=modelNameOrDigest&set=setName&readonly=true
POST /api/model/:model/workset/:set/readonly/:readonly

PUT create or replace workset

PUT /api/workset-new
POST /api/workset-new

PATCH create or merge workset

PATCH /api/workset
POST /api/workset

DELETE workset

DELETE /api/model/:model/workset/:set
POST /api/model/:model/workset/:set/delete
POST /api/workset/delete?model=modelNameOrDigest&set=setName

DELETE parameter from workset

DELETE /api/model/:model/workset/:set/parameter/:name
POST /api/model/:model/workset/:set/parameter/:name/delete
POST /api/workset-parameter/delete?model=modelNameOrDigest&set=setName&parameter=name

PATCH update workset parameter values

POST /api/workset-parameter-new-value?model=modelNameOrDigest&set=setName&name=parameterName
PATCH /api/model/:model/workset/:set/parameter/:name/new/value
POST /api/model/:model/workset/:set/parameter/:name/new/value

PATCH update workset parameter values (enum id's)

POST /api/workset-parameter-new-value-id?model=modelNameOrDigest&set=setName&name=parameterName
PATCH /api/model/:model/workset/:set/parameter/:name/new/value-id
POST /api/model/:model/workset/:set/parameter/:name/new/value-id


Run Models: run models and monitor progress

POST a request to run the model

POST /api/model/new-run?model=modelNameOrDigest&sub-count=16
POST /api/model/:model/new-run
POST /api/model/:model/new-run/sub-values/:sub-count

GET state of current model run

GET /api/model/new-run-state?model=modelNameOrDigest&start=0&count=0
GET /api/model/:model/new-run-state
GET /api/model/:model/new-run-state/start/:start
GET /api/model/:model/new-run-state/start/:start/count/:count


<metadesc>OpenM++: open source microsimulation platform</metadesc>