Skip to content

Retrieve multiple twins

Request

Retrieve twin details for the list of twin Ids included in the request body. Any ids that do not reference valid twins will silently be omitted from the response -- no 404/NotFound will be generated. Match response against your query to find any invalid IDs.

Security
oauth2
Query
includeRelationshipsboolean

When true, the response includes the incoming and outgoing relationships

Default:false
Bodyapplication/jsonrequired

Array of twin Ids.

Array of strings, [ 1 .. 100 ] items
[ "string" ]

Responses

Twin information

Bodyapplication/json
Array [
idstring, non-emptyrequired

The unique Id of the digital twin.

Example:"TW-DD-II-L01"
modelIdstring, non-emptyrequired

Digital Twin Model Identifier.

Example:"dtmi:com:willowinc:Level;1"
lastUpdateTimenull or string, (date-time)

Timestamp when the twin was last updated in ISO 8601 format.

Example:"2024-08-30T03:49:30.4062816+00:00"
eTagnull or string

Concurrency tag for optimistic concurrency control. Populated from the underlying ADT entity when sourced from AdtQuery; null when sourced from ADX.

contentsobject

This field will contain properties and components as defined in the contents section of the DTDL definition of the twin.

Example:
{ "levelNumber": 0, "mappedIds": [ { … }, { … }, { … }, { … }, { … }, { … } ], "name": "Floor_1", "uniqueID": "a360cf30-c112-40a1-b4b4-f65da82fa9e8", "externalID": "FLRPXxxxxxxxxxxxxxxxx", "code": "L01", "siteID": "104bd33c-a697-4027-b6a6-677e30a53d09", "alternateClassification": { "brickSchema": { … } }, "externalIds": { "mappingKey": "msrc:///CON5xxxxxxxxxxxxxxxx@willow-source/twin/TW-DD-II-L01" }, "area": { "$metadata": { … } } }
incomingRelationshipsArray of objects(DigitalTwinRelationship)

Incoming relationships

Example:
[ { "Id": "Room-L01-100_isPartOf_TW-DD-II-L01", "targetId": "TW-DD-II-L01", "sourceId": "Room-L01-100", "name": "isPartOf" } ]
outgoingRelationshipsArray of objects(DigitalTwinRelationship)

Outgoing relationships

Example:
[ { "Id": "TW-DD-II-L01_isPartOf_BLDG-1", "targetId": "BLDG-1", "sourceId": "TW-DD-II-L01", "name": "isPartOf" } ]
]
Response
[ { "id": "TW-DD-II-L01", "modelId": "dtmi:com:willowinc:Level;1", "lastUpdateTime": "2024-08-30T03:49:30.4062816+00:00", "contents": { … }, "incomingRelationships": [ … ], "outgoingRelationships": [ … ] } ]