Skip to main content
POST
Add device references
The device in the path is the referrer. relationship describes the link: its key, whether it accepts several devices (multi), and its direction (type). Take the three values from List connections for a canonical type, which returns each connection a device can have in exactly this shape. The link is stored on both devices. Each linked device holds the reverse link, with the opposite type. Both devices need an ontology applied, and the connection must be valid for them. The request is refused with 400 when:
  • A device would reference itself.
  • A listed device is already linked to the device in the path.
  • The link would create a loop, directly or through other devices, or reverse a link that already exists.
  • A device has no ontology.
A successful request returns 204 with an empty body. Read the links back with List device references to confirm they were stored.

Authorizations

Authorization
string
header
required

Paste an access token from Create an access token. Tokens expire, so request a new one if you receive 401.

Path Parameters

buildingId
string
required

Building identifier from List buildings.

deviceId
string
required

Device identifier.

Body

application/json
relationship
object
required
referencedDeviceIds
string[]
required
Minimum array length: 1

Response

The links were added. The body is empty.