Oms API GET database cleanup log - openmpp/openmpp.github.io GitHub Wiki

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."
  ]
}
⚠️ **GitHub.com Fallback** ⚠️