Skip to content

Oms API GET upload log file

amc1999 edited this page May 5, 2022 · 3 revisions

GET upload log file from upload directory on the server.

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

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

Upload can be initiated through UI or by direct API call:

For each upload oms service does create a upload log file, for example:

  • RiskPaths.set.New-Data.ready.upload.log RiskPaths New-Data workset, upload completed and ready to use
  • RiskPaths.set.New-Data.progress.upload.log RiskPaths New-Data, upload in progress
  • RiskPaths.set.New-Data.error.upload.log RiskPaths New-Data, upload failed

Example of RiskPaths.set.New-Data.ready.upload.log:

2022-03-09 00:21:45.195 Upload of: RiskPaths.set.New-Data
------------------
Upload           : RiskPaths.set.New-Data.zip
Model Name       : RiskPaths
Model Version    : 3.0.0.0 2022-03-07 23:37:41.202
Model Digest     : d90e1e9a49a06d972ecf1d50e684c62b
Scenario Name    : New-Data
Folder           : RiskPaths.set.New-Data
------------------
2022-03-09 00:21:45.195 delete: RiskPaths.set.New-Data.ready.upload.log
2022-03-09 00:21:45.195 delete: RiskPaths.set.New-Data.error.upload.log
2022-03-09 00:21:45.195 delete: RiskPaths.set.New-Data
2022-03-09 00:21:45.195 dbcopy -m RiskPaths -dbcopy.IdOutputNames=false -dbcopy.SetName New-Data -dbcopy.To db -dbcopy.Zip -dbcopy.InputDir models\home\io\upload
2022-03-09 00:21:45.219 Model RiskPaths
2022-03-09 00:21:45.219 Unpack RiskPaths.set.New-Data.zip
2022-03-09 00:21:45.249 Workset New-Data into: 103 New-Data
2022-03-09 00:21:45.249   Parameters: 3
2022-03-09 00:21:45.277 Done.

As result of workset upload oms service does:

  • upload archive, for example: RiskPaths.set.New-Data.zip
  • extract workset .csv files with parameters into RiskPaths.set.New-Data folder
  • extract workset .json metadata file
  • create new or update existing New-Data workset in RiskPaths model database

Method:

GET /api/upload/log/file/:name

Arguments:

:name - (required) upload log file name, for example: `RiskPaths.set.New-Data.ready.upload.log`

Call example from browser:

http://localhost:4040/api/upload/log/file/RiskPaths.set.New-Data.ready.upload.log

Return example:

{
  "Status": "ready",
  "Kind": "upload",
  "ModelDigest": "d90e1e9a49a06d972ecf1d50e684c62b",
  "RunDigest": "",
  "WorksetName": "New-Data",
  "IsFolder": true,
  "Folder": "RiskPaths.set.New-Data",
  "FolderModTime": 1646803541985,
  "IsZip": true,
  "ZipFileName": "RiskPaths.set.New-Data.zip",
  "ZipModTime": 1646803541965,
  "ZipSize": 1690,
  "LogFileName": "RiskPaths.set.New-Data.ready.upload.log",
  "LogModTime": 1646803542034,
  "Lines": [
    "2022-03-09 00:25:41.964 Upload of: RiskPaths.set.New-Data ",
    "------------------ ",
    "Upload           : RiskPaths.set.New-Data.zip ",
    "Model Name       : RiskPaths ",
    "Model Version    : 3.0.0.0 2022-03-07 23:37:41.202 ",
    "Model Digest     : d90e1e9a49a06d972ecf1d50e684c62b ",
    "Scenario Name    : New-Data ",
    "Folder           : RiskPaths.set.New-Data ",
    "------------------ ",
    "2022-03-09 00:25:41.965 delete: RiskPaths.set.New-Data.ready.upload.log ",
    "2022-03-09 00:25:41.965 delete: RiskPaths.set.New-Data.error.upload.log ",
    "2022-03-09 00:25:41.965 delete: RiskPaths.set.New-Data ",
    "2022-03-09 00:25:41.966 dbcopy -m RiskPaths -dbcopy.IdOutputNames=false -dbcopy.SetName New-Data -dbcopy.To db -dbcopy.Zip -dbcopy.InputDir models\\home\\io\\upload ",
    "2022-03-09 00:25:41.983 Model RiskPaths  ",
    "2022-03-09 00:25:41.983 Unpack RiskPaths.set.New-Data.zip ",
    "2022-03-09 00:25:42.004 Workset New-Data into: 103 New-Data ",
    "2022-03-09 00:25:42.004   Parameters: 3 ",
    "2022-03-09 00:25:42.034 Done. ",
    ""
  ]
}

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