Notehub.io supports routing data to Azure Functions using the Azure Route type. This guide provides instructions for using this Route type in your Notecard applications.
In order to follow the instructions in this guide, you'll need the following:
- A Notecard assigned to a Notehub.io project, with data synching from the Notecard to Notehub.io.
- A deployed Azure Function. See the Azure Functions Documentation for quickstart guides and other resources if you need help creating your Function.
To create an Azure Function Route, choose the Azure option when creating a new route in Notehub.
Provide the endpoint to your Azure Function in the URL field, and use the remaining configuration fields to restrict this Route to a Fleet or Notefile, transform the outbound payload, or to rate-limit Route execution.
If you need to create a Route against a function secured by a secret key, first change your route’s Type to Function (Secret Key), and next provide your function key from the Azure portal in the Secret Key field.
Once you've created an Azure Function Route in Notehub.io, you can verify that it is working through the Notehub Events table.
Notehub.io provides a Route Log for each event. To access it, click on an individual event on the Events view, then click the "Details" link.
Then, click on the "Route Log" tab.
If your Route is properly configured, the Azure Function will return a status code of 200 and the response specified in the source of your Function.
If the server returns an error, Notehub.io will display error details in the Route Log.