Hi,
I am successfully calling my own REST API Workflow which takes a sensor number and sensor value as input, and computes a failure probability (%) based on a previously learned PMML Model. It then returns the input parameters and the probability. Very similar to:
https://www.knime.org/blog/the-knime-server-rest-api
One thing I came accross:
When I change the "default input parameter" value of sensor_value=58 (this default value is defined/found in the json input node...) to the value of 44 in the "post" to execute call by adding
{
"json-input-1": {
"jsonvalue" : {
"sensor_nr": 1,
"sensor_value": 44
}}}
and post (=execute) it looks like:
The returned input parameters in the "inputParameters" section are still the default ones, whereas it seems that the changed ones have been used in the computation to compute the probability. Can you please check why the default values are shown in the Input section and not the overwritten values? Is this normal? Am I doing s.th. wrong?
Here is the relevant part returned message:
...
"id": "70411b61-3dd7-4041-9057-3eb7ccb50215",
"hasReport": false,
"inputParameters": {
"json-input-1": {
"sensor_nr": 1,
"sensor_value": 58
}
},
"workflow": "/API/Nussbaum/Predict_Failure_Stanze1_Sensor1",
"isOutdated": false,
"notifications": {},
"outputValues": {
"json-output-2": {
"sensor_nr": 1,
"sensor_value": 44,
"Prediction": 0.25520970353681205
}
...
Thanks a lot!
Best Regards
Florian
p.s. not sure if related: I found it a bit strange to insert the extra "jsonvalue" : { ... } in the message to post to overwrite input values - but I found that in the link as well, so I guess it is necessary and is working - since at least in the returned outputValues, the overwritten input value is found! If there is another way to not use addition "jsonvalue" : { ... }, please tell me.