Skip to content

Commit 5755bd7

Browse files
authored
Merge pull request #104001 from nberdy/patch-3
Update how-to-send-additional-data.md
2 parents 5900173 + d98bdbf commit 5755bd7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

articles/iot-dps/how-to-send-additional-data.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
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)
44
author: menchi
55
ms.author: menchi
6-
ms.date: 10/29/2019
6+
ms.date: 02/11/2020
77
ms.topic: conceptual
88
ms.service: iot-dps
99
services: iot-dps
1010
---
1111

12-
# How to transfer additional data between device and DPS
12+
# How to transfer a payload between device and DPS
1313
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.
1414

1515
## 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.
1717

18-
## Device sends data to DPS
18+
## Device sends data payload to DPS
1919
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:
2020
```
2121
{
@@ -26,12 +26,12 @@ When your device is sending a [register device call](https://docs.microsoft.com/
2626
“storageRootKey”: “things”
2727
},
2828
“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.”
3030
}
3131
```
3232

3333
## 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.
3535
```
3636
{
3737
"iotHubHostName": "sample-iot-hub-1.azure-devices.net",
@@ -45,7 +45,7 @@ If the custom allocation policy webhook wishes to return some data to the device
4545
}
4646
}
4747
},
48-
"returnData": "whatever is returned by the webhook"
48+
"payload": "whatever is returned by the webhook"
4949
}
5050
```
5151

0 commit comments

Comments
 (0)