Skip to content

Relationships

Relationship endpoints enable creating, updating, and fetching relationship details.

Create or replace a twin relationship

Request

Only one relationship between twin T1 and twin T2 with the same name and properties can be present -- if the given relationship already exists, the operation is idempotent. Id of the relationship will be derived by the system and will override the value present in the request.

Security
oauth2
Bodyapplication/jsonrequired

Instance of DigitalTwinRelationship.

idstring

The unique Id of the relationship entity.

targetIdstring, non-emptyrequired

The Id of the target twin.

Example:"Chiller-1"
sourceIdstring, non-emptyrequired

The Id of the source twin.

Example:"AHU-1"
namestring, non-emptyrequired

The name of the relationship, which defines the type of link from source twin to target twin (e.g. isPartOf, locatedIn, servedBy, etc.. ).

Example:"isFedBy"
propertiesobject

Additional properties of the relationship as defined in the DTDL model.

Example:
{ "substance": "ChilledWater" }
{ "Id": "AHU-1_isFedBy_substance_ChilledWater_Chiller-1", "targetId": "Chiller-1", "sourceId": "AHU-1", "name": "isFedBy", "properties": { "substance": "ChilledWater" } }

Responses

Created or Updated DigitalTwinRelationship.

Bodyapplication/json
idstring

The unique Id of the relationship entity.

targetIdstring, non-emptyrequired

The Id of the target twin.

Example:"Chiller-1"
sourceIdstring, non-emptyrequired

The Id of the source twin.

Example:"AHU-1"
namestring, non-emptyrequired

The name of the relationship, which defines the type of link from source twin to target twin (e.g. isPartOf, locatedIn, servedBy, etc.. ).

Example:"isFedBy"
propertiesobject

Additional properties of the relationship as defined in the DTDL model.

Example:
{ "substance": "ChilledWater" }
Response
{ "Id": "AHU-1_isFedBy_substance_ChilledWater_Chiller-1", "targetId": "Chiller-1", "sourceId": "AHU-1", "name": "isFedBy", "properties": { "substance": "ChilledWater" } }