We have an application which uses the KNIME Server REST API to retrieve workflow definitions and run them.
Until know we were using Quickforms inputs which are now legacy. Thus we’ve been wanting to switch to using Widgets instead. However, we seem to not be able to extract input parameters from Widget through the REST API, either from the workflow root or in a Component.
Based on this post I thought Widgets would be exposed in the API.
Here is an example workflow that I deployed to our server:
And here is the output of the REST :openapi endpoint:
no neither Widgets nor Configuration nodes are exposed via the REST API. You need to use Container nodes for this. I would recommend the Container Input (Row) it can receive multiple parameters at once.
I did try to use Container nodes and for your use-case Container variables work very well.
However on the same topic, I have not been able to properly use the Container Input File node. When I add it, it is not listed in the inputParameters on the :openapi definition. To see it, I need to make a request to :jobs and only then I see it in inputResources. Is there a way to read it from the openapi definition?
Also, on the KNIME Hub it is indicated that a multipart/form-data call must be done, but not to which endpoint. Is it to the /rest/v4/jobs/ path?