Skip to content

Commit 6fdb486

Browse files
authored
Merge pull request #100861 from KingdomOfEnds/adt-refresh
ADT Refresh
2 parents 4428b0c + 03502e0 commit 6fdb486

File tree

7 files changed

+44
-20
lines changed

7 files changed

+44
-20
lines changed

articles/digital-twins/how-to-add-blobs.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: bertvanhoof
77
ms.service: digital-twins
88
services: digital-twins
99
ms.topic: conceptual
10-
ms.date: 11/13/2019
10+
ms.date: 01/10/2020
1111
ms.custom: seodec18
1212
---
1313

@@ -31,7 +31,7 @@ In addition to **Content-Type** and **Content-Disposition**, Azure Digital Twins
3131

3232
The four main JSON schemas are:
3333

34-
[![JSON schemas](media/how-to-add-blobs/blob-models-img.png)](media/how-to-add-blobs/blob-models-img.png#lightbox)
34+
[![JSON schemas](media/how-to-add-blobs/blob-models-swagger-img.png)](media/how-to-add-blobs/blob-models-swagger-img.png#lightbox)
3535

3636
JSON blob metadata conforms to the following model:
3737

@@ -191,7 +191,7 @@ curl -X POST "YOUR_MANAGEMENT_API_URL/spaces/blobs" \
191191
| YOUR_SPACE_ID | The ID of the space to associate the blob with |
192192
| PATH_TO_FILE | The path to your text file |
193193

194-
[![cURL example](media/how-to-add-blobs/curl-img.png)](media/how-to-add-blobs/curl-img.png#lightbox)
194+
[![cURL example](media/how-to-add-blobs/http-blob-post-through-curl-img.png)](media/how-to-add-blobs/http-blob-post-through-curl-img.png#lightbox)
195195

196196
A successful POST returns the ID of the new the blob.
197197

@@ -203,7 +203,7 @@ The following sections describe the core blob-related API endpoints and their fu
203203

204204
You can attach blobs to devices. The following image shows the Swagger reference documentation for your Management APIs. It specifies device-related API endpoints for blob consumption and any required path parameters to pass into them.
205205

206-
[![Device blobs](media/how-to-add-blobs/blobs-device-api-img.png)](media/how-to-add-blobs/blobs-device-api-img.png#lightbox)
206+
[![Device blobs](media/how-to-add-blobs/blobs-device-api-swagger-img.png)](media/how-to-add-blobs/blobs-device-api-swagger-img.png#lightbox)
207207

208208
For example, to update or create a blob and attach the blob to a device, make an authenticated HTTP PATCH request to:
209209

@@ -221,7 +221,7 @@ Successful requests return a JSON object as [described earlier](#blobs-response-
221221

222222
You can also attach blobs to spaces. The following image lists all space API endpoints responsible for handling blobs. It also lists any path parameters to pass into those endpoints.
223223

224-
[![Space blobs](media/how-to-add-blobs/blobs-space-api-img.png)](media/how-to-add-blobs/blobs-space-api-img.png#lightbox)
224+
[![Space blobs](media/how-to-add-blobs/blobs-space-api-swagger-img.png)](media/how-to-add-blobs/blobs-space-api-swagger-img.png#lightbox)
225225

226226
For example, to return a blob attached to a space, make an authenticated HTTP GET request to:
227227

@@ -241,7 +241,7 @@ A PATCH request to the same endpoint updates metadata descriptions and creates v
241241

242242
You can attach blobs to user models (for example, to associate a profile picture). The following image shows relevant user API endpoints and any required path parameters, like `id`:
243243

244-
[![User blobs](media/how-to-add-blobs/blobs-users-api-img.png)](media/how-to-add-blobs/blobs-users-api-img.png#lightbox)
244+
[![User blobs](media/how-to-add-blobs/blobs-users-api-swagger-img.png)](media/how-to-add-blobs/blobs-users-api-swagger-img.png#lightbox)
245245

246246
For example, to fetch a blob attached to a user, make an authenticated HTTP GET request with any required form data to:
247247

@@ -257,23 +257,41 @@ Successful requests return a JSON object as [described earlier](#blobs-response-
257257

258258
## Common errors
259259

260-
A common error involves not supplying the correct header information:
260+
* A common error involves not supplying the correct header information:
261261

262-
```JSON
263-
{
264-
"error": {
265-
"code": "400.600.000.000",
266-
"message": "Invalid media type in first section."
267-
}
268-
}
269-
```
262+
```JSON
263+
{
264+
"error": {
265+
"code": "400.600.000.000",
266+
"message": "Invalid media type in first section."
267+
}
268+
}
269+
```
270+
271+
To resolve this error, verify that the overall request has an appropriate **Content-Type** header:
272+
273+
* `multipart/mixed`
274+
* `multipart/form-data`
275+
276+
Also, verify that each *multipart chunk* has an appropriate corresponding **Content-Type**.
277+
278+
* A second common error arises when multiple blobs are assigned to the same resource in your [spatial intelligence graph](concepts-objectmodel-spatialgraph.md):
279+
280+
```JSON
281+
{
282+
"error": {
283+
"code": "400.600.000.000",
284+
"message": "SpaceBlobMetadata already exists."
285+
}
286+
}
287+
```
270288

271-
To resolve this error, verify that the overall request has an appropriate **Content-Type** header:
289+
> [!NOTE]
290+
> The **message** attribute will vary based on the resource.
272291
273-
* `multipart/mixed`
274-
* `multipart/form-data`
292+
Only one blob (of each kind) may be attached to each resource within your spatial graph.
275293

276-
Also, verify that each multipart chunk has a corresponding **Content-Type** as needed.
294+
To resolve this error, update the existing blob by using the appropriate API HTTP PATCH operation. Doing so will replace the existing blob data with the desired data.
277295

278296
## Next steps
279297

articles/digital-twins/how-to-configure-postman.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: bertvanhoof
77
ms.service: digital-twins
88
services: digital-twins
99
ms.topic: conceptual
10-
ms.date: 11/13/2019
10+
ms.date: 01/10/2020
1111
---
1212

1313
# How to configure Postman for Azure Digital Twins
@@ -127,6 +127,12 @@ After completing the previous steps, configure Postman to make an authenticated
127127
128128
1. Lastly, select **Send** to submit your multipart HTTP POST request. A status code of `200` or `201` indicates a successful request. The appropriate response message will appear in the client interface.
129129
130+
1. Validate your HTTP POST request data by calling the API endpoint:
131+
132+
```URL
133+
YOUR_MANAGEMENT_API_URL/spaces/blobs?includes=description
134+
```
135+
130136
## Next steps
131137

132138
- To learn about the Digital Twins management APIs, and how to use them, read [How to use Azure Digital Twins management APIs](how-to-navigate-apis.md).

0 commit comments

Comments
 (0)