Skip to content

Oms API GET database cleanup log

amc1999 edited this page Aug 29, 2026 · 4 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. If error detected during database cleanup then log error flag: IsError: true and log file renamed with extension .error.txt instead of .console.txt.

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 1:

http://localhost:4040/api/admin/db-cleanup/log/db-cleanup.2026_07_29_11_11_05_553.RiskPaths.sqlite.console.txt
{
  "BaseName": "RiskPaths.sqlite",
  "LogStamp": "2026_07_29_11_11_05_553",
  "LogFileName": "db-cleanup.2026_07_29_11_11_05_553.RiskPaths.sqlite.console.txt",
  "IsError": false,
  "Size": 801,
  "ModTs": 1785337867059,
  "Lines": [
    "2026-07-29 11:11:05.554 \\go-ompp\\etc\\db-cleanup.bat models\\bin\\RiskPaths-3.0.0.0\\RiskPaths.sqlite no-name no-digest en-CA",
    "OM_ROOT  : C:\\go-ompp\\etc\\..",
    "Model db : models\\bin\\RiskPaths-3.0.0.0\\RiskPaths.sqlite",
    "Model    : RiskPaths",
    "Language : en-CA",
    "\"Source model run status count:\"",
    "s|1",
    "\"Update source input scenario: set read-only\"",
    "\"Source input scenario count:\"",
    "1",
    "2026-07-29 11:11:06.888 Model RiskPaths",
    "2026-07-29 11:11:06.931 Model run from 102 RiskPaths_Default to 101",
    "2026-07-29 11:11:06.932   Parameters: 9",
    "2026-07-29 11:11:06.960   Tables: 7",
    "2026-07-29 11:11:06.990 Workset Default from id 101 to 102",
    "2026-07-29 11:11:06.991   Parameters: 9",
    "2026-07-29 11:11:07.023 Done.",
    "\"Results model run status:\"",
    "s|1",
    "\"Results input scenario count:\"",
    "1",
    "Done.",
    "2026-07-29 11:11:07.059 Done."
  ]
}

Example 2:

Database cleanup failed, log file renamed from db-cleanup.....console.txt into db-cleanup.....error.txt. Response log file name not the same as request log file name and error flag set: IsError: true.

http://localhost:4040/api/admin/db-cleanup/log/db-cleanup.2026_08_04_22_03_54_747.modelOne.sqlite.console.txt
{
  "BaseName": "modelOne.sqlite",
  "LogStamp": "2026_08_04_22_03_54_747",
  "LogFileName": "db-cleanup.2026_08_04_22_03_54_747.modelOne.sqlite.error.txt",
  "IsError": true,
  "Size": 333,
  "ModTs": 1785895434807,
  "Lines": [
    "2026-08-04 22:03:54.747 \\go-ompp\\etc\\db-cleanup.bat models\\bin\\modelOne.sqlite no-name no-digest en-CA",
    "OM_ROOT  : C:\\go-ompp\\c-4040",
    "Model db : models\\bin\\modelOne.sqlite",
    "Model    : modelOne",
    "Language : en-CA",
    "\"ERROR: dbcopy utility not found (or invalid): C:\\go-ompp\\c-4040\\bin\\dbcopy.exe\"",
    "2026-08-04 22:03:54.807 exit status 1"
  ]
}

Home

Getting Started

Model development in OpenM++

Using OpenM++

OpenM++ user interface

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 models and web-service state

Global Administrator: manage all web-services

Clone this wiki locally