Oms API PATCH replace profile - openmpp/openmpp.github.io GitHub Wiki
Create new or replace existing profile.
Profile is a set of key-value options which can be used to run the model.
This method insert new or replace all existing profile options. If no such profile exist in database then new profile created.
If profile already exist then it is delete-insert operation:
- all existing profile key-value options deleted from database;
- new key-value options inserted.
Profile is uniquely identified by name (inside of the database). Profile are not a property of the model and you can use same profile for different models. Beta version: beta version API uses model name or digest to find profile.
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 than result is undefined.
This is a beta version and may change in the future.
Method:
PATCH /api/model/:model/profile
For example:
curl -v -X PATCH -H "Content-Type: application/json" "http://localhost:4040/api/model/modelOne/profile" -d @m1.profile.json
JSON arguments:
It is expected to be same JSON as return of GET model profile method.
For example (m1.profile.json file):
{
"Name": "m1",
"Opts": {
"OpenM.SparseOutput": "false",
"Parameter.StartingSeed": "192"
}
}