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-dps/how-to-send-additional-data.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,21 @@
1
1
---
2
-
title: How to transfer additional data between device and Azure Device Provisioning Service
3
-
description: This document describes how to transfer additional data between device and Device Provisioning Service (DPS)
2
+
title: How to transfer a payload between device and Azure Device Provisioning Service
3
+
description: This document describes how to transfer a payload between device and Device Provisioning Service (DPS)
4
4
author: menchi
5
5
ms.author: menchi
6
-
ms.date: 10/29/2019
6
+
ms.date: 02/11/2020
7
7
ms.topic: conceptual
8
8
ms.service: iot-dps
9
9
services: iot-dps
10
10
---
11
11
12
-
# How to transfer additional data between device and DPS
12
+
# How to transfer a payload between device and DPS
13
13
Sometimes DPS needs more data from devices to properly provision them to the right IoT Hub, and that data needs to be provided by the device. Vice versa, DPS can return data to the device to facilitate client side logics.
14
14
15
15
## When to use it
16
-
This feature can be used as an enhancement for [custom allocation](https://docs.microsoft.com/azure/iot-dps/how-to-use-custom-allocation-policies). For instance, you want to allocate your devices based on the device model without human intervention. In this case, you will use [custom allocation](https://docs.microsoft.com/azure/iot-dps/how-to-use-custom-allocation-policies). You can configure the device to report the model information as part of the [register device call](https://docs.microsoft.com/rest/api/iot-dps/runtimeregistration/registerdevice). DPS will pass the device’s information into to the custom allocation webhook. And your function can decide which IoT Hub this device will go to when it receives device model information. Similarly, if the webhook wishes to return some data to the device, it will pass the data back as a string in the webhook response.
16
+
This feature can be used as an enhancement for [custom allocation](https://docs.microsoft.com/azure/iot-dps/how-to-use-custom-allocation-policies). For instance, you want to allocate your devices based on the device model without human intervention. In this case, you will use [custom allocation](https://docs.microsoft.com/azure/iot-dps/how-to-use-custom-allocation-policies). You can configure the device to report the model information as part of the [register device call](https://docs.microsoft.com/rest/api/iot-dps/runtimeregistration/registerdevice). DPS will pass the device’s payload into to the custom allocation webhook. And your function can decide which IoT Hub this device will go to when it receives device model information. Similarly, if the webhook wishes to return some data to the device, it will pass the data back as a string in the webhook response.
17
17
18
-
## Device sends data to DPS
18
+
## Device sends data payload to DPS
19
19
When your device is sending a [register device call](https://docs.microsoft.com/rest/api/iot-dps/runtimeregistration/registerdevice) to DPS, The register call can be enhanced to take other fields in the body. The body looks like the following:
20
20
```
21
21
{
@@ -26,12 +26,12 @@ When your device is sending a [register device call](https://docs.microsoft.com/
26
26
“storageRootKey”: “things”
27
27
},
28
28
“interfaces”: “TODO: get how interfaces are reported by devices from PnP folks.”,
29
-
“data”: “your additional data goes here. It can be nested JSON.”
29
+
“payload”: “your additional data goes here. It can be nested JSON.”
30
30
}
31
31
```
32
32
33
33
## DPS returns data to the device
34
-
If the custom allocation policy webhook wishes to return some data to the device, it will pass the data back as a string in the webhook response. The change is in the returnData section below.
34
+
If the custom allocation policy webhook wishes to return some data to the device, it will pass the data back as a string in the webhook response. The change is in the payload section below.
0 commit comments