Notehub.io supports routing data to Azure Functions using the Azure Function 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 either the "Azure Function" or "Azure Function with Secret Key" options in the "Route Type" dropdown on the Notehub.io Route creation screen. If creating a Route against a function secured by a secret key, you'll need to obtain a function key from the Azure portal and provide it in the "Azure Function Secret Key" field.
Provide the endpoint to your Azure Function in the "Route 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.
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.