In this topic I will be looking into how to deploy and call a Workflow as a REST (Representational State Transfer) Web service.
The first step is to create the 'Callee' workflow and upload it to the KNIME Hub. Below you can see a screenshot of this Workflow. It is based on the 'Airport Lookup' workflow I wrote about in the Agentic AI topic .
I connect to the cloud Postgres instance of the Data Warehouse and select the SCD_airports table. The important new nodes I am using here, are 'Container Input', which will receive the IATA code input parameter from the calling workflow, and the 'Container Output (JSON)' node, which will return the airport name output to the calling workflow.
The next step is to save the workflow and upload it to the KNIME hub.
Now, we need to develop the 'Caller' workflow, which will call our Airport Lookup Service. I will go over some of its nodes below.
The 'Space Connector' node is necessary to gain access to the Space on KNIME hub where the Callee workflow was uploaded
As the purpose of this workflow is just to test the Callee web service, I used the 'Variable Creator' and following nodes just to create the input parameter (the Airport code) for the Call Workflow node
The most important node here is the 'Call Workflow'. Below you can see a screenshot of its configuration dialog.
The final two nodes are just to check the results. Below you see the output of the Data to Report node. It works!
On the next page, I will look at how to call a REST service from tools external to KNIME