-
Notifications
You must be signed in to change notification settings - Fork 0
Oms API GET Run Output Table csv calculated expressions Ids
Calculate and read output table expression(s) values from model run as csv file.
Read output table expressions, calculate additional measure for each expression and get it as response stream UTF-8 outputTable.csv file attachment, optionally starts with byte order mark (BOM).
Measures calculated as one of the following:
- for each table expression calculate one of: avg, sum, count, max, min, var, sd, se, cv
- as arbitrary aggreagated expressions provided as comma separated list
Dimension(s) returned as enum id's.
Methods:
GET /api/model/:model/run/:run/table/:name/calc/:calc/csv-id
GET /api/model/:model/run/:run/table/:name/calc/:calc/csv-id-bom
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.
:run - (required) model run digest, run stamp or run name
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.
:name - (required) output table name
:calc - (required) name of additional measure to calculate
Additional measure must be one of:
-
avg
mean of expression sub-values -
sum
sum of expression sub-values -
count
count of expression sub-values (excluding NULL's) -
max
maximum of expression sub-values -
min
minimum of expression sub-values -
var
variance of expression sub-values -
sd
standard deviation of expression sub-values -
se
standard error of expression sub-values -
cv
coefficient of variation of expression sub-values
Or a list of comma-separated aggreagated expressions, for example: OM_AVG(acc0) , 2 * SQRT(OM_SUM(acc1) - OM_SD(acc0))
It is also possible to use parameter(s) in calculation, parameter must be a scalar of float or integer type.
For example: OM_COUNT_IF(acc1 > param.High)
, where param.High
is a value of scalar parameter High
in that model run.
Following aggregation functions avaliable:
-
OM_AVG
mean of accumulators sub-values -
OM_SUM
sum of accumulators sub-values -
OM_COUNT
count of accumulators sub-values (excluding NULL's) -
OM_COUNT_IF
count values matching condition -
OM_MAX
maximum of accumulators sub-values -
OM_MIN
minimum of accumulators sub-values -
OM_VAR
variance of accumulators sub-values -
OM_SD
standard deviation of accumulators sub-values -
OM_SE
standard error of accumulators sub-values -
OM_CV
coefficient of variation of accumulators sub-values
For more details please see: Model Output Expressions
Call examples:
http://localhost:4040/api/model/RiskPaths/run/RiskPaths_Default/table/T04_FertilityRatesByAgeGroup/calc/avg/csv-id
http://localhost:4040/api/model/RiskPaths/run/RiskPaths_Default/table/T04_FertilityRatesByAgeGroup/calc/sd/csv-id-bom
http://localhost:4040/api/model/_201208171604590148_/run/f172e98da17beb058f30f11768053456/table/salarySex/calc/se/csv-id
http://localhost:4040/api/model/_201208171604590148_/run/2019_01_17_19_59_52_998/table/salarySex/calc/cv/csv-id-bom
http://localhost:4040/api/model/modelOne/run/Default-4/table/salarySex/calc/OM_AVG(acc0),2*SQRT(OM_SUM(acc1)-OM_SD(acc0))/csv-id
http://localhost:4040/api/model/modelOne/run/Default-4/table/salarySex/calc/OM_COUNT_IF(acc0%3Cparam.StartingSeed)/csv-id
Note: OM_COUNT_IF(acc0%3Cparam.StartingSeed)
is URL encoded: OM_COUNT_IF(acc0<param.StartingSeed)
Return example:
calc_id
column contains output table expression id's: 0 <= expr_id < 12000
or id's of calculated values: expr_id + 12000
.
For example, id of calculated value SE(Expr2)
is: calc_id = 12002
curl http://localhost:4040/api/model/RiskPaths/run/RiskPaths_Default_4/table/T04_FertilityRatesByAgeGroup/calc/avg/csv-id
run_id,calc_id,Dim0,Dim1,calc_value
102,0,0,0,0
102,0,0,1,null
102,0,0,2,null
102,0,0,3,null
102,0,0,4,null
102,0,0,5,null
102,0,1,0,0.0183139978773642
102,0,1,1,0.315246747433367
102,0,1,2,null
102,0,1,3,0
102,0,1,4,0
102,0,1,5,null
102,0,2,0,0.0537541294539804
102,0,2,1,0.713129647941936
102,0,2,2,0.27913884088947
102,0,2,3,0.0340306112997705
102,0,2,4,0.631356771396228
102,0,2,5,null
102,0,3,0,0.0544540553970037
102,0,3,1,0.814226115392992
102,0,3,2,0.225999767108206
102,0,3,3,0.0225289422479095
102,0,3,4,0.552801004995511
102,0,3,5,0
102,0,4,0,0.0539099306643693
102,0,4,1,0.809582230266138
102,0,4,2,0.195155708061047
102,0,4,3,0.0414901238939861
102,0,4,4,0.59945794749404
102,0,4,5,0
102,0,5,0,0.0415985067709889
102,0,5,1,0.602459144412015
102,0,5,2,0.187080449150788
102,0,5,3,0.0203496069483281
102,0,5,4,1.00906724659711
102,0,5,5,0
102,0,6,0,0.0314673689946165
102,0,6,1,0.462198924442823
102,0,6,2,0.137851629822403
102,0,6,3,0.0229824909841167
102,0,6,4,0.362222813716797
102,0,6,5,0.0572026776260319
102,0,7,0,0.0416497396600501
102,0,7,1,0.549536875782365
102,0,7,2,0.110088801281195
102,0,7,3,0.0468326974687102
102,0,7,4,0.330292197388013
102,0,7,5,0
102,0,8,0,0.0221476827597504
102,0,8,1,0.240119203514267
102,0,8,2,0.0732205051114689
102,0,8,3,0
102,0,8,4,0.391609286784764
102,0,8,5,0
102,0,9,0,0.0118488890311401
102,0,9,1,0.131862730376457
102,0,9,2,0.0830998727570066
102,0,9,3,0.0221047417383149
102,0,9,4,0.279863987999404
102,0,9,5,0.114442750608107
102,0,10,0,0.017525081049452
102,0,10,1,0.157747779554811
102,0,10,2,0.0572711925357155
102,0,10,3,0
102,0,10,4,0.169455199059931
102,0,10,5,0
102,0,11,0,0
102,0,11,1,0
102,0,11,2,0
102,0,11,3,0
102,0,11,4,0
102,0,11,5,0
102,12000,0,0,0
102,12000,0,1,null
102,12000,0,2,null
102,12000,0,3,null
102,12000,0,4,null
102,12000,0,5,null
102,12000,1,0,0.0183150153186944
102,12000,1,1,0.316271343152912
102,12000,1,2,null
102,12000,1,3,0
102,12000,1,4,0
102,12000,1,5,null
102,12000,2,0,0.0537675746731247
102,12000,2,1,0.713529542211133
102,12000,2,2,0.290605057165821
102,12000,2,3,0.0257953477423063
102,12000,2,4,0.971013422710935
102,12000,2,5,null
102,12000,3,0,0.054451507853128
102,12000,3,1,0.815769510398502
102,12000,3,2,0.229287238004696
102,12000,3,3,0.0127116167313564
102,12000,3,4,0.429415814994704
102,12000,3,5,0
102,12000,4,0,0.0541040962861145
102,12000,4,1,0.80980843837352
102,12000,4,2,0.195232130104512
102,12000,4,3,0.0425462458785113
102,12000,4,4,0.831967409785808
102,12000,4,5,0
102,12000,5,0,0.0417067099443355
102,12000,5,1,0.602467976857289
102,12000,5,2,0.186968206655534
102,12000,5,3,0.0315133813846249
102,12000,5,4,1.28700220240812
102,12000,5,5,0
102,12000,6,0,0.0314820070793188
102,12000,6,1,0.462127063133201
102,12000,6,2,0.137897098019438
102,12000,6,3,0.0295557293946093
102,12000,6,4,0.268318808255325
102,12000,6,5,0.0267057657548253
102,12000,7,0,0.0416625733706113
102,12000,7,1,0.567544621403048
102,12000,7,2,0.111089012753633
102,12000,7,3,0.0452064833182238
102,12000,7,4,0.463879691400302
102,12000,7,5,0
102,12000,8,0,0.022442211806591
102,12000,8,1,0.26518578732689
102,12000,8,2,0.0759259959848827
102,12000,8,3,0
102,12000,8,4,0.557998028374596
102,12000,8,5,0
102,12000,9,0,0.0110885846008521
102,12000,9,1,0.13577342261578
102,12000,9,2,0.0815471990733788
102,12000,9,3,0.0123398583333944
102,12000,9,4,0.235867044941869
102,12000,9,5,0.0534359868184371
102,12000,10,0,0.0172608633104785
102,12000,10,1,0.165574819914602
102,12000,10,2,0.0569355432493007
102,12000,10,3,0
102,12000,10,4,0.165135000822642
102,12000,10,5,0
102,12000,11,0,0
102,12000,11,1,0
102,12000,11,2,0
102,12000,11,3,0
102,12000,11,4,0
102,12000,11,5,0
- Windows: Quick Start for Model Users
- Windows: Quick Start for Model Developers
- Linux: Quick Start for Model Users
- Linux: Quick Start for Model Developers
- MacOS: Quick Start for Model Users
- MacOS: Quick Start for Model Developers
- Model Run: How to Run the Model
- MIT License, Copyright and Contribution
- Model Code: Programming a model
- Windows: Create and Debug Models
- Linux: Create and Debug Models
- MacOS: Create and Debug Models
- MacOS: Create and Debug Models using Xcode
- Modgen: Convert case-based model to openM++
- Modgen: Convert time-based model to openM++
- Modgen: Convert Modgen models and usage of C++ in openM++ code
- Model Localization: Translation of model messages
- How To: Set Model Parameters and Get Results
- Model Run: How model finds input parameters
- Model Output Expressions
- Model Run Options and ini-file
- OpenM++ Compiler (omc) Run Options
- OpenM++ ini-file format
- UI: How to start user interface
- UI: openM++ user interface
- UI: Create new or edit scenario
- UI: Upload input scenario or parameters
- UI: Run the Model
- UI: Use ini-files or CSV parameter files
- UI: Compare model run results
- UI: Aggregate and Compare Microdata
- UI: Filter run results by value
- UI: Disk space usage and cleanup
- UI Localization: Translation of openM++
-
Highlight: hook to self-scheduling or trigger attribute
-
Highlight: The End of Start
-
Highlight: Enumeration index validity and the
index_errors
option -
Highlight: Simplified iteration of range, classification, partition
-
Highlight: Parameter, table, and attribute groups can be populated by module declarations
- Oms: openM++ web-service
- Oms: openM++ web-service API
- Oms: How to prepare model input parameters
- Oms: Cloud and model runs queue
- Use R to save output table into CSV file
- Use R to save output table into Excel
- Run model from R: simple loop in cloud
- Run RiskPaths model from R: advanced run in cloud
- Run RiskPaths model in cloud from local PC
- Run model from R and save results in CSV file
- Run model from R: simple loop over model parameter
- Run RiskPaths model from R: advanced parameters scaling
- Run model from Python: simple loop over model parameter
- Run RiskPaths model from Python: advanced parameters scaling
- Windows: Use Docker to get latest version of OpenM++
- Linux: Use Docker to get latest version of OpenM++
- RedHat 8: Use Docker to get latest version of OpenM++
- Quick Start for OpenM++ Developers
- Setup Development Environment
- 2018, June: OpenM++ HPC cluster: Test Lab
- Development Notes: Defines, UTF-8, Databases, etc.
- 2012, December: OpenM++ Design
- 2012, December: OpenM++ Model Architecture, December 2012
- 2012, December: Roadmap, Phase 1
- 2013, May: Prototype version
- 2013, September: Alpha version
- 2014, March: Project Status, Phase 1 completed
- 2016, December: Task List
- 2017, January: Design Notes. Subsample As Parameter problem. Completed
GET Model Metadata
- GET model list
- GET model list including text (description and notes)
- GET model definition metadata
- GET model metadata including text (description and notes)
- GET model metadata including text in all languages
GET Model Extras
GET Model Run results metadata
- GET list of model runs
- GET list of model runs including text (description and notes)
- GET status of model run
- GET status of model run list
- GET status of first model run
- GET status of last model run
- GET status of last completed model run
- GET model run metadata and status
- GET model run including text (description and notes)
- GET model run including text in all languages
GET Model Workset metadata: set of input parameters
- GET list of model worksets
- GET list of model worksets including text (description and notes)
- GET workset status
- GET model default workset status
- GET workset including text (description and notes)
- GET workset including text in all languages
Read Parameters, Output Tables or Microdata values
- Read parameter values from workset
- Read parameter values from workset (enum id's)
- Read parameter values from model run
- Read parameter values from model run (enum id's)
- Read output table values from model run
- Read output table values from model run (enum id's)
- Read output table calculated values from model run
- Read output table calculated values from model run (enum id's)
- Read output table values and compare model runs
- Read output table values and compare model runs (enun id's)
- Read microdata values from model run
- Read microdata values from model run (enum id's)
- Read aggregated microdata from model run
- Read aggregated microdata from model run (enum id's)
- Read microdata run comparison
- Read microdata run comparison (enum id's)
GET Parameters, Output Tables or Microdata values
- GET parameter values from workset
- GET parameter values from model run
- GET output table expression(s) from model run
- GET output table calculated expression(s) from model run
- GET output table values and compare model runs
- GET output table accumulator(s) from model run
- GET output table all accumulators from model run
- GET microdata values from model run
- GET aggregated microdata from model run
- GET microdata run comparison
GET Parameters, Output Tables or Microdata as CSV
- GET csv parameter values from workset
- GET csv parameter values from workset (enum id's)
- GET csv parameter values from model run
- GET csv parameter values from model run (enum id's)
- GET csv output table expressions from model run
- GET csv output table expressions from model run (enum id's)
- GET csv output table accumulators from model run
- GET csv output table accumulators from model run (enum id's)
- GET csv output table all accumulators from model run
- GET csv output table all accumulators from model run (enum id's)
- GET csv calculated table expressions from model run
- GET csv calculated table expressions from model run (enum id's)
- GET csv model runs comparison table expressions
- GET csv model runs comparison table expressions (enum id's)
- GET csv microdata values from model run
- GET csv microdata values from model run (enum id's)
- GET csv aggregated microdata from model run
- GET csv aggregated microdata from model run (enum id's)
- GET csv microdata run comparison
- GET csv microdata run comparison (enum id's)
GET Modeling Task metadata and task run history
- GET list of modeling tasks
- GET list of modeling tasks including text (description and notes)
- GET modeling task input worksets
- GET modeling task run history
- GET status of modeling task run
- GET status of modeling task run list
- GET status of modeling task first run
- GET status of modeling task last run
- GET status of modeling task last completed run
- GET modeling task including text (description and notes)
- GET modeling task text in all languages
Update Model Profile: set of key-value options
- PATCH create or replace profile
- DELETE profile
- POST create or replace profile option
- DELETE profile option
Update Model Workset: set of input parameters
- POST update workset read-only status
- PUT create new workset
- PUT create or replace workset
- PATCH create or merge workset
- DELETE workset
- POST delete multiple worksets
- DELETE parameter from workset
- PATCH update workset parameter values
- PATCH update workset parameter values (enum id's)
- PATCH update workset parameter(s) value notes
- PUT copy parameter from model run into workset
- PATCH merge parameter from model run into workset
- PUT copy parameter from workset to another
- PATCH merge parameter from workset to another
Update Model Runs
- PATCH update model run text (description and notes)
- DELETE model run
- POST delete model runs
- PATCH update run parameter(s) value notes
Update Modeling Tasks
Run Models: run models and monitor progress
Download model, model run results or input parameters
- GET download log file
- GET model download log files
- GET all download log files
- GET download files tree
- POST initiate entire model download
- POST initiate model run download
- POST initiate model workset download
- DELETE download files
- DELETE all download files
Upload model runs or worksets (input scenarios)
- GET upload log file
- GET all upload log files for the model
- GET all upload log files
- GET upload files tree
- POST initiate model run upload
- POST initiate workset upload
- DELETE upload files
- DELETE all upload files
Download and upload user files
- GET user files tree
- POST upload to user files
- PUT create user files folder
- DELETE file or folder from user files
- DELETE all user files
User: manage user settings
Model run jobs and service state
- GET service configuration
- GET job service state
- GET disk usage state
- POST refresh disk space usage info
- GET state of active model run job
- GET state of model run job from queue
- GET state of model run job from history
- PUT model run job into other queue position
- DELETE state of model run job from history
Administrative: manage web-service state
- POST a request to refresh models catalog
- POST a request to close models catalog
- POST a request to close model database
- POST a request to delete the model
- POST a request to open database file
- POST a request to cleanup database file
- GET the list of database cleanup log(s)
- GET database cleanup log file(s)
- POST a request to pause model run queue
- POST a request to pause all model runs queue
- PUT a request to shutdown web-service