ThingsBoard icon

ThingsBoard

Interact with ThingsBoard REST API

Relation → Get

AI-generated

Summary

Fetches a specific ThingsBoard relation by matching the 'from' entity, 'from' type, relation type, 'to' entity, and 'to' type.

Inputs

  • authentication — Method to authenticate with ThingsBoard (API Key or Username/Password).
  • fromId (required) — The entity ID for the 'from' side of the relation.
  • fromType (required) — The entity type for the 'from' side (e.g., DEVICE, ASSET).
  • relationType (required) — The type of the relation to match.
  • toId (required) — The entity ID for the 'to' side of the relation.
  • toType (required) — The entity type for the 'to' side (e.g., DEVICE, ASSET).

Output shape

a single relation object

The exact structure of the relation object depends on the ThingsBoard API response.

Examples

Example 1: Retrieve a specific relation between two devices.

From: Device ID 'abc123', Type 'DEVICE'; To: Device ID 'def456', Type 'DEVICE'; Relation Type: 'CONTAINS'.

Links

Discussion