Skip to content

Commit e595c18

Browse files
Merge pull request #220639 from baanders/12-6-metadata
ADT: Update twin metadata guidance
2 parents aad7770 + 674f2dc commit e595c18

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

articles/digital-twins/how-to-manage-twin.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,10 @@ The result of calling `object result = await client.GetDigitalTwinAsync("my-moon
117117
"$metadata": {
118118
"$model": "dtmi:example:Moon;1",
119119
"radius": {
120-
"desiredValue": 1737.1,
121-
"desiredVersion": 5,
122-
"ackVersion": 4,
123-
"ackCode": 200,
124-
"ackDescription": "OK"
120+
"lastUpdateTime": "2022-12-06T20:00:32.8209188Z"
125121
},
126122
"mass": {
127-
"desiredValue": 0.0734,
128-
"desiredVersion": 8,
129-
"ackVersion": 8,
130-
"ackCode": 200,
131-
"ackDescription": "OK"
123+
"lastUpdateTime": "2022-12-04T12:04:43.3859361Z"
132124
}
133125
}
134126
}
@@ -137,12 +129,12 @@ The result of calling `object result = await client.GetDigitalTwinAsync("my-moon
137129
The defined properties of the digital twin are returned as top-level properties on the digital twin. Metadata or system information that isn't part of the DTDL definition is returned with a `$` prefix. Metadata properties include the following values:
138130
* `$dtId`: The ID of the digital twin in this Azure Digital Twins instance
139131
* `$etag`: A standard HTTP field assigned by the web server. This is updated to a new value every time the twin is updated, which can be useful to determine whether the twin's data has been updated on the server since a previous check. You can use `If-Match` to perform updates and deletes that only complete if the entity's etag matches the etag provided. For more information on these operations, see the documentation for [DigitalTwins Update](/rest/api/digital-twins/dataplane/twins/digitaltwins_update) and [DigitalTwins Delete](/rest/api/digital-twins/dataplane/twins/digitaltwins_delete).
140-
* `$metadata`: A set of other properties, including:
141-
- The DTMI of the model of the digital twin.
142-
- Synchronization status for each writable property. This is most useful for devices, where it's possible that the service and the device have diverging statuses (for example, when a device is offline). Currently, this property only applies to physical devices connected to IoT Hub. With the data in the metadata section, it's possible to understand the full status of a property, as well as the last modified timestamps. For more information about sync status, see this [IoT Hub tutorial](../iot-hub/tutorial-device-twins.md) on synchronizing device state.
143-
- Service-specific metadata, like from IoT Hub or Azure Digital Twins.
132+
* `$metadata`: A set of metadata properties, which might include the following:
133+
- `$model`, the DTMI of the model of the digital twin.
134+
- `lastUpdateTime` for twin properties. This is a timestamp indicating the date and time the property update message was processed by Azure Digital Twins
135+
- `sourceTime` for twin properties. This is an optional, writable property representing the timestamp when the property update was observed in the real world.
144136
145-
You can read more about the serialization helper classes like `BasicDigitalTwin` in [Azure Digital Twins APIs and SDKs](concepts-apis-sdks.md#serialization-helpers).
137+
You can read more about the fields contained in a digital twin in [Digital twin JSON format](concepts-twins-graph.md#digital-twin-json-format). You can read more about the serialization helper classes like `BasicDigitalTwin` in [Azure Digital Twins APIs and SDKs](concepts-apis-sdks.md#serialization-helpers).
146138
147139
## View all digital twins
148140

0 commit comments

Comments
 (0)