REST API Reference//
- List incoming relationships for a twin
Create or replace a twin relationship
Retrieve a twin relationship
List outgoing relationships for a twin
List incoming relationshi...
- https://.app.willowinc.com/api/v3https://.app.willowinc.com/api/v3/twins/{twinId}/relationships/incoming
const twinId = 'YOUR_twinId_PARAMETER';
const instance = 'YOUR_instance_PARAMETER';
const resp = await fetch(
`https://${instance}.app.willowinc.com/api/v3/twins/${twinId}/relationships/incoming`,
{
method: 'GET',
headers: {
Authorization: 'Bearer <YOUR_TOKEN_HERE>'
}
}
);
const data = await resp.text();
console.log(data);Relationships retrieved.
Array []
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"
Response
[ { "Id": "AHU-1_isFedBy_substance_ChilledWater_Chiller-1", "targetId": "Chiller-1", "sourceId": "AHU-1", "name": "isFedBy", "properties": { … } } ]