Actions60
- Alarm Actions
- Asset Actions
- Customer Actions
- Dashboard Actions
- Device Actions
- Entity Group Actions
- Relation Actions
- Telemetry Actions
Telemetry → Save Entity Attributes
AI-generatedSummary
Saves or updates entity attributes on a ThingsBoard entity for a specified scope.
Inputs
- entityId (required) — A string value representing the entity ID (e.g., a device ID).
- entityType — A string value representing the entity type (e.g., 'DEVICE', 'ASSET'). Defaults to 'DEVICE'.
- scope — The attribute scope to save to. Options are 'SERVER_SCOPE' or 'SHARED_SCOPE'. Defaults to 'SERVER_SCOPE'.
- attributesJson (required) — A JSON object containing key-value pairs for the attributes to create or update. Supports string, boolean, number, and nested JSON values.
Output shape
A status object indicating success: { status: 'Entity attributes saved successfully' }.
Sends a POST request to the ThingsBoard REST API. Does not return the updated entity data, only a success confirmation.
Examples
Example 1: Save server-scoped attributes for a device
Entity ID: 'device-123', Type: 'DEVICE', Scope: 'SERVER_SCOPE', Attributes: { firmwareVersion: '1.0.2', status: 'online' }
Example 2: Update shared attributes for an asset
Entity ID: 'asset-456', Type: 'ASSET', Scope: 'SHARED_SCOPE', Attributes: { location: 'Warehouse A', manager: 'John Doe' }