Skip to content
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Aliases

An alias is a reference to one or more entities, used as a data source in dashboard widgets.

Aliases are either static (fixed, pre-selected entities) or dynamic (resolved at runtime based on entity type, relations, or dashboard state).

Create an alias from the dashboard toolbar, or on the fly while configuring a widget.

From the dashboard toolbar:

  1. Open the dashboard and switch to Edit mode.
  2. Click the Entity aliases icon in the toolbar.
  3. In the Entity aliases dialog, click Add alias.
  4. Enter an alias name, select a Filter type, fill in the fields it requires, and click Add.
  5. Click Save to apply.

While configuring a widget:

  1. Click the pencil icon on the widget to open its settings.
  2. In the Datasource section, switch to Entity alias.
  3. Type the new alias name and click Create new.
  4. Complete the alias configuration and click Add.
  5. Apply and save the widget — the alias is created and assigned in one step.

Open the widget’s settings, switch Datasource to Entity alias, and select an existing alias from the dropdown. Add the data keys you need and apply.

  1. Open the dashboard, switch to Edit mode, and click the Entity aliases icon in the toolbar.
  2. Click the pencil icon next to the alias you want to edit.
  3. Update the configuration and click Save.
  4. Click Save in the Entity aliases dialog to apply your changes.
  1. Open the dashboard, switch to Edit mode, and click the Entity aliases icon in the toolbar.
  2. Click the X icon next to the alias you want to delete.
  3. Click Save in the Entity aliases dialog to apply your changes.

The following alias types are available for dashboard widgets.

The Resolve as multiple entities toggle (visible in the alias configuration dialog) controls whether the alias can return more than one entity. It is enabled by default for multi-entity alias types (e.g., Entity list, Entity type) and disabled for single-entity types. Widgets that display a single value (e.g., value cards) work with single-entity aliases; table and chart widgets typically use multi-entity aliases.

Points to exactly one entity, chosen by type and name. Example: set Type to Device and the entity to “Thermometer A1” — a widget using this alias shows just that device’s data.

Resolves to every entity in one entity group you select. Example: set Type to Device and the entity group to “Thermostats” — a widget using this alias shows every device in that group (Thermometer A1, A2, A3).

Resolves to a fixed list of entities that you pick individually. Example: list Thermometer A1, Compressor BC-10, and Compressor QA-32 — a widget using this alias shows data for exactly those three devices.

Resolves to every entity of a chosen type whose name starts with the text you enter. Example: set Type to Device and the name filter to “Compressor” — a widget using this alias shows every device whose name starts with “Compressor” (Compressor BC-10, Compressor QA-32).

Resolves to every entity of a chosen type across the tenant, including entities owned by customers. Example: set Type to Device — a widget using this alias shows every device, tenant- and customer-owned alike.

Resolves to a set of entity groups of a chosen type, picked by name. Example: set Type to Device and list the groups Compressors and Thermostats — a widget using this alias shows those two group names.

Resolves to every entity group whose name starts with the text you enter. Example: set Type to Device and the name filter to “Compressor” — a widget using this alias shows every device group whose name starts with “Compressor” (Compressors).

Resolves to every entity that belongs to the group matching an exact name. Example: set Type to Device and the group name to “Compressors” — a widget using this alias shows every device in that group (Compressor BC-10, Compressor QA-32).

Resolves to the entity passed in through a dashboard state parameter — the mechanism behind drill-down dashboards.

When a user interacts with a widget (for example, clicks a table row), a navigation action can pass the selected entity to the next dashboard state as a named parameter. Widgets in that target state then use this alias to automatically show data for the entity the user picked.

Example: A drill-down dashboard where clicking a device row navigates to a detail state showing that device’s data.

  1. Add a new dashboard state to hold the detail view (for example, named ${entityName}).
  2. Open the settings of the widget that lists your entities (e.g., an entities table), go to its Actions section, and add an action: set the type to Update current dashboard state, the target state to the one you created, and enable Set entity from widget.
  3. In the detail state, add a widget and set its Entity alias to Entity from dashboard state — leave the state entity parameter as By default unless your action uses a custom parameter name.
  4. Save the dashboard. Clicking a row in the entities table now opens the detail state showing data for the selected entity.

Resolves to the owner of the entity from the current dashboard state — the tenant or customer that entity belongs to, rather than the entity itself.

Use it in customer-hierarchy dashboards to show information about the customer who owns a selected device, without an extra navigation step.

Example: A dashboard showing a device list, with a second widget resolving the owner of whichever device row is clicked.

  1. Create an alias with filter type Owner of entity from dashboard state.
  2. Add a widget using that alias as its Entity alias — this is the widget that displays the owner.
  3. Open the settings of the entities table widget, go to its Actions section, and add an action: source On row click, type Update current dashboard state, with Set entity from widget enabled.
  4. Save the dashboard. Clicking a device row now updates the owner widget to show that device’s owning customer or tenant.

Resolves to assets that match a chosen asset profile, optionally narrowed further by name. Example: set the asset profile to “buildings” and the name filter to “Build” — a widget using this alias shows every building-profile asset whose name starts with “Build” (Building A, Building B).

Resolves to devices that match a chosen device profile, optionally narrowed further by name. Example: set the device profile to “thermometers” and the name filter to “Therm” — a widget using this alias shows every thermometer-profile device whose name starts with “Therm” (Thermometer A1, A2, A3).

Resolves to entity views that match a chosen type, optionally narrowed further by name. Example: set the entity view type to “Compressors Entity View Type” — a widget using this alias shows every matching entity view (Compressor BC-10 Entity View, Compressor QA-32 Entity View).

Resolves to edges that match a chosen type, optionally narrowed further by name. Example: set the edge type to “edge instances” and the name filter to “Edge” — a widget using this alias shows every matching edge (Edge instance 1, Edge instance 2).

Resolves to the tenant’s API usage statistics entity — no additional filters needed. A widget using this alias can display its fields directly, such as emailApiState.

Resolves to the entities connected to a root entity by relations, traversed up to a chosen depth and direction. Example: set the root entity to asset “District A”, direction to “From”, and the max relation level to 3 — a widget using this alias shows every entity related to “District A” up to 3 levels deep.

Resolves to the assets of chosen profiles connected to a root entity by relations, traversed up to a chosen depth and direction. Example: set the root entity to device “Compressor QA-32”, direction to “To”, and the asset types to “district” and “buildings” — a widget using this alias shows the matching assets connected to that device.

Resolves to the devices of chosen profiles connected to a root entity by relations, traversed up to a chosen depth and direction. Example: set the root entity to asset “Building A”, direction to “From”, and the device type to “compressors” — a widget using this alias shows the matching devices directly related to that asset.

Resolves to the entity views of chosen types connected to a root entity by relations, traversed up to a chosen depth and direction. Example: set the root entity to asset “Building A”, direction to “From”, and the entity view type to “Compressors Entity View Type” — a widget using this alias shows the matching entity views directly related to that asset.

Resolves to the edges of chosen types connected to a root entity by relations, traversed up to a chosen depth and direction. Example: set the root entity to asset “Building A”, direction to “From”, and the edge type to “edge instances” — a widget using this alias shows the matching edges directly related to that asset.

Resolves to the scheduler events attached to a chosen originator entity, optionally narrowed by event type. Example: set the originator to device “Compressor BC-10” and leave the event type empty to match any type — a widget using this alias shows every scheduler event attached to that device.

Subreport templates support all standard entity aliases listed above. In addition, they provide two special aliases that resolve to the entity passed from the master report:

AliasResolves to
Entity from master reportThe entity passed to this subreport by the master report. One subreport instance is generated per entity if the master’s datasource returns multiple.
Owner of entity from master reportThe customer or tenant that owns the entity passed by the master report

Report templates support all standard entity aliases listed above. In addition, notification-triggered reports provide two extra aliases that resolve to the entity that initiated the report:

AliasResolves to
Originator entityThe entity that triggered the notification (e.g. the device that raised an alarm)
Owner of originator entityThe customer or tenant that owns the originator entity