ThingsBoard icon

ThingsBoard

Interact with ThingsBoard REST API

Relation → By to (with Relation Type)

AI-generated

Summary

Retrieves a list of relation objects for a target entity identified by To ID and To Type, optionally filtered by a specific Relation Type.

Inputs

  • Authentication — Method for authenticating with the ThingsBoard API (API Key or Username/Password).
  • Relation Type (required) — The type of the relation to filter results by. Required when filtering.
  • To ID (required) — A string value representing the target entity ID.
  • To Type (required) — A string value representing the target entity type (e.g., DEVICE).

Output shape

a list of relation objects

Returns relations where the target entity is the 'to' endpoint of the relation.

Examples

Example 1: Fetch all Device-to-Asset relations for a specific Asset.

To ID: Asset ID, To Type: ASSET, Relation Type: DEVICE-ASSET

Example 2: Fetch all relations pointing to a specific Customer entity.

To ID: Customer ID, To Type: CUSTOMER, Relation Type: (empty to get all relation types)

Links

Discussion