You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-central/core/howto-create-webhooks.md
+73-1Lines changed: 73 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create webhooks on rules in Azure IoT Central | Microsoft Docs
3
3
description: Create webhooks in Azure IoT Central to automatically notify other applications when rules fire.
4
4
author: viv-liu
5
5
ms.author: viviali
6
-
ms.date: 12/02/2019
6
+
ms.date: 04/03/2020
7
7
ms.topic: how-to
8
8
ms.service: iot-central
9
9
services: iot-central
@@ -38,6 +38,78 @@ Now when the rule is triggered, you see a new request appear in RequestBin.
38
38
39
39
When a rule is triggered, an HTTP POST request is made to the callback URL containing a json payload with the telemetry, device, rule, and application details. The payload could look like the following:
40
40
41
+
```json
42
+
{
43
+
"timestamp": "2020-04-06T00:20:15.06Z",
44
+
"action": {
45
+
"id": "<id>",
46
+
"type": "WebhookAction",
47
+
"rules": [
48
+
"<rule_id>"
49
+
],
50
+
"displayName": "Webhook 1",
51
+
"url": "<callback_url>"
52
+
},
53
+
"application": {
54
+
"id": "<application_id>",
55
+
"displayName": "Contoso",
56
+
"subdomain": "contoso",
57
+
"host": "contoso.azureiotcentral.com"
58
+
},
59
+
"device": {
60
+
"id": "<device_id>",
61
+
"etag": "<etag>",
62
+
"displayName": "MXChip IoT DevKit - 1yl6vvhax6c",
63
+
"instanceOf": "<device_template_id>",
64
+
"simulated": true,
65
+
"provisioned": true,
66
+
"approved": true,
67
+
"cloudProperties": {
68
+
"City": {
69
+
"value": "Seattle"
70
+
}
71
+
},
72
+
"properties": {
73
+
"deviceinfo": {
74
+
"firmwareVersion": {
75
+
"value": "1.0.0"
76
+
}
77
+
}
78
+
},
79
+
"telemetry": {
80
+
"<interface_instance_name>": {
81
+
"humidity": {
82
+
"value": 47.33228889360127
83
+
}
84
+
}
85
+
}
86
+
},
87
+
"rule": {
88
+
"id": "<rule_id>",
89
+
"displayName": "Humidity monitor"
90
+
}
91
+
}
92
+
```
93
+
If the rule monitors aggregated telemetry over a period of time, the payload will contain a different telemetry section.
94
+
95
+
```json
96
+
{
97
+
"telemetry": {
98
+
"<interface_instance_name>": {
99
+
"Humidity": {
100
+
"avg": 39.5
101
+
}
102
+
}
103
+
}
104
+
}
105
+
```
106
+
107
+
## Data format change notice
108
+
109
+
If you have one or more webhooks created and saved before **3 April 2020**, you will need to delete the webhook and create a new webhook. This is because older webhooks use an older payload format that will be deprecated in the future.
110
+
111
+
### Webhook payload (format deprecated as of 3 April 2020)
0 commit comments