APIs are a common way to move data between applications - UrsaLeo supports several types. REST APIs are typically used to retrieve historical data and web streaming (web sockets) APIs can send real time data to another application.

Within the Rules engine, UrsaLeo supports webhooks - essentially a way of sending data to a unique url when something happens. So say we create a rule that fires when the humidity rises above 60% - with a webhook that information can be sent to an external application.

There are a number of API interface applications available - we’ve tested the platform using one of the most popular, Zapier. Within Zapier the process begins by creating a ‘Zap’ (a series of automated steps) and starting by creating a webhook address.

As you can see we are going to be waiting for a piece of data generated by the UrsaLeo platform. Once the hook is created, Zapier provides a unique url which is then used in a rule on the UrsaLeo platform.

We can then add an ‘action’ in Zapier to connect the collected data to another app. This can be one (or more) of literally hundreds of applications - we’ve tested it with Slack, Microsoft Teams, Salesforce.com, Zen Desk and even used this approach to generate a Gmail (useful if you want your email to come from a different email domain than ursaleo.com)

Here’s a screen shot of testes being run on Slack

As you can see the payload of the webhook can include variables - such as the rule name, sensor readings and timestamps. Webhooks are incredibly useful!