-
-
Notifications
You must be signed in to change notification settings - Fork 9
tutorial v3 scheduled rest call
Raymond Meester edited this page Mar 17, 2023
·
2 revisions
In this tutorial you learn how to create a request/reply flow calling a REST API through a scheduler. We start with the flow created in the Quick Start.
- Like in tutorial1 clone the 'TestFlow'.
- Give the flow the name 'REST'.
- Change the URI scheme of the From endpoint to Scheduler and the Path context to "foo".
- Set the URI option "Delay" to "60000".
This means the connector will run every 60 seconds. Triggering the To endpoint.
- Set the URI scheme of the To endpoint to REST and the Path context to get:api/v1/employees.
- Set the URI option "Host" to http://dummy.restapiexample.com.
As a last step we add a Response endpoint:
- Click in the To endpoint "Add Reponse Endpoint".
- Set the component of the Response endpoint to file and the path to "C:/messages/reply".
After the changes you can save the flow.
-
Start the flow 'REST'
-
Check the folder "C:/messages/reply" (after 60 seconds a file with content should appear on disk)
Tip: Check the log file to see what's happing on the background. Administration --> Log viewer.
The REST Component can be used to host a REST endpoint (as a server) or call a REST Endpoint (as a client). More info you can find on the REST Component page.
next tutorial to create simple route.