Skip to content

Oms API GET database cleanup log

amc1999 edited this page Mar 11, 2024 · 2 revisions

User can reduce database file size by invoking database cleanup script. Console output from cleanup script captured into the log file. This method allow to get the content of database cleanup log file by name. Use GET the list of database cleanup log(s) method to obtain log file names.

Method:

GET /api/admin/db-cleanup/log/:name

Arguments:

:name   - (required) database cleanup log file name.

Example:

curl http://localhost:4040/api/admin/db-cleanup/log/db-cleanup.2024_03_09_00_15_49_684.RiskPaths.sqlite.console.txt
{
  "DbName": "RiskPaths.sqlite",
  "LogStamp": "2024_03_09_00_29_10_038",
  "LogFileName": "db-cleanup.2024_03_09_00_29_10_038.RiskPaths.sqlite.console.txt",
  "Size": 729,
  "ModTs": 1709962150344,
  "Lines": [
    "2024-03-09 00:29:10.038 etc/db-cleanup_linux.sh models/bin/RiskPaths.sqlite",
    "Model db : RiskPaths.sqlite",
    "Model    : RiskPaths",
    "OM_ROOT  : /home/anatoly/ompp-main",
    "/usr/bin/sqlite3",
    "Source model run status count:",
    "s|1",
    "Update source input scenario: set read-only",
    "Source input scenario count:",
    "1",
    "2024-03-09 00:29:10.259 Model RiskPaths",
    "2024-03-09 00:29:10.296 Model run from 102 RiskPaths_Default to 101",
    "2024-03-09 00:29:10.296   Parameters: 9",
    "2024-03-09 00:29:10.315   Tables: 7",
    "2024-03-09 00:29:10.329 Workset Default from id 101 to 102",
    "2024-03-09 00:29:10.329   Parameters: 9",
    "2024-03-09 00:29:10.341 Done.",
    "Results model run status:",
    "s|1",
    "Results input scenario count:",
    "1",
    "Done: models/bin/RiskPaths.sqlite",
    "2024-03-09 00:29:10.348 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