I have seen workflows that initiate API requests to get data from external services, like Twitter. And I have seen workflows, like Random Forest predictors that generate JSON output.
But are there any workflow examples in which an external service initiates an API request by sending data to a server, having a KNIME workflow make a prediction, and then KNIME sends back that prediction to the external service?
I imagine this is not an unusual situation. For example, you build a good model in KNIME that predicts whether a loan will default and now the bank wants to have its loan approval software send an API request to the model predictor and receive back a probability of default.
Thank you very much for any workflow suggestions or other advice.
Hello @njacknis ,
As soon as you upload a workflow to the KNIME Server it automatically becomes available as a webservice via REST API there are no additional steps required.
Please find below some useful document about this function called REST API:
https://docs.knime.com/latest/server_user_guide/index.html#webservice-interfaces
The last one is an example almost the same as you described.
BR
Thank you very much! These links are very helpful. Although I was thinking of passing the data in a simple CSV-type file, it does seem that JSON is the preferred method of passing the data. I’ll have to change my program.
In the meantime, I am looking into getting access to KNIME server which seems necessary for these workflows.
Thank you again, Norman Jacknis
Hi Norman,
If you use the Container Input (Raw HTTP) and Container Output (Raw HTTP) nodes for receiving and sending back data, you can also let the workflow handle arbitrary input and output formats. It is available in the latest version of KNIME Server only.
Kind regards,
Alexander
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.