Oms API POST cleanup database file - openmpp/openmpp.github.io GitHub Wiki

User can reduce database file size by invoking database cleanup script.

Method:

POST /api/admin/db-cleanup/:path
POST /api/admin/db-cleanup/:path/name/:name
POST /api/admin/db-cleanup/:path/name/:name/digest/:digest

Arguments:

:path   - (required) path to model database file
:name   - (optional) model name
:digest - (optional) model digest

Path must be relative to models/bin folder. If there any sub-folders in the path then / slashes must be replaced with * stars.

Path, model name and model digest are passed as an arguments to the database cleanup script, for example: Linux script to cleanup database file.

Call examples:

curl -v -X POST http://localhost:4040/api/admin/db-cleanup/RiskPaths.sqlite

curl -v -X POST http://localhost:4040/api/admin/db-cleanup/OncoSimX*v3.6.5.2*OncoSimX-allcancers.sqlite/name/OncoSimX-AllCancers

curl -v -X POST http://localhost:4040/api/admin/db-cleanup/RiskPaths.sqlite/name/RiskPaths/digest/d90e1e9a49a06d972ecf1d50e684c62b

For example:

curl -v -X POST http://localhost:4040/api/admin/db-cleanup/RiskPaths.sqlite

*   Trying [::1]:4040...
* Connected to localhost (::1) port 4040
> POST /api/admin/db-cleanup/RiskPaths.sqlite HTTP/1.1
> Host: localhost:4040
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Sat, 09 Mar 2024 05:15:49 GMT
< Content-Length: 82
<
{"LogFileName":"db-cleanup.2024_03_09_00_15_49_684.RiskPaths.sqlite.console.txt"}

⚠️ **GitHub.com Fallback** ⚠️