Azure Functions

Getting started

Notify function when a rule is triggered in Qubitro. When the conditions of the rule are met, a POST request will be sent to the callback URL of the function you provide

Request body

post
Example rule request

https://your.function.url/path
An example rule request for the scenario that triggers when condition met for the temperature. device_id, rule_id, time_stamp, and payload are default values for the request body.
Request
Response
Request
Body Parameters
temperature
optional
string
Selected entity for condition
device_id
required
string
Device id
rule_id
required
string
Rule id
time_stamp
required
string
Timestamp
payload
required
string
Contains all entities in condition as a JSON object.
Response
200: OK
Example response of function. See the example below.
Recevied from device : {
"topic": "t/a",
"time_stamp": 1585411612273,
"rule_id": "5A1EC67F8EBCCF440060052810003",
"payload": "{\"Temperature\":20}",
"device_id": "DeviceID",
"Temperature": 20
}

Example

Python
.NET Core
Javascript
Typescript
Python

Example code for Python runtime.

.NET Core

Example code for .NET Core runtime.

Javascript

Example code for Javascript.

Typescript

Example code for Typescript.