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 function you provide

Request body

post
Example rule request

https://your.function.url/path
An example rule request for scenario that triggers when condition met for the temperature. device_id, rule_id, time_stamp and payload are default values for 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
An 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

An example code for Python runtime.

.NET Core

An example code for .NET Core runtime.

Javascript

An example code for Javascript.

Typescript

An example code for Typescript.