Oms API POST close model database - openmpp/openmpp.github.io GitHub Wiki

User can close model database connection, for example, to cleanup database file and reduce storage space. After database connection is closed model would not be available until it is opened again by POST a request to open database file or POST a request to refresh models catalog.

Method:

POST /api/admin/model/:model/close

Arguments:

:model - (required) model digest or model name

Model can be identified by digest or by model name. It is recommended to use digest because it is uniquely identifies model. It is possible to use model name, which is more human readable than digest, but if there are multiple models with same name in database then result is undefined.

Call examples:

curl -v -X POST http://localhost:4040/api/admin/model/RiskPaths/close
curl -v -X POST http://localhost:4040/api/admin/model/d90e1e9a49a06d972ecf1d50e684c62b/close

For example:

curl -v -X POST http://localhost:4040/api/admin/model/d90e1e9a49a06d972ecf1d50e684c62b/close

*   Trying [::1]:4040...
* Connected to localhost (::1) port 4040
> POST /api/admin/model/d90e1e9a49a06d972ecf1d50e684c62b/close HTTP/1.1
> Host: localhost:4040
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Location: /api/admin/model/d90e1e9a49a06d972ecf1d50e684c62b/close
< Content-Type: text/plain
< Date: Sat, 09 Mar 2024 04:43:35 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
⚠️ **GitHub.com Fallback** ⚠️