REST API Calls: Changed Input Parameters seem to be used but default values displayed as "inputParameters"?

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.

That the default value was returned even though the correct value was used in the workflow is a known bug. That was fixed in the latest server releases (4.3.1 and 4.2.8).

I believe that the additional jsonvalue parameter is necessary (I'm afraid that I didn't test without it).

Hi,

thanks!

Just a quick update fyi - I found by chance: when testing again, it also worked without the additional json "jsonvalue:{}" entry, e.g.:

{"json-input-1": {"sensor_nr": 3,"sensor_value": 58}}

Best

Florian