ThingsBoard icon

ThingsBoard

Interact with ThingsBoard REST API

Telemetry → Save Entity Telemetry

AI-generated

Summary

Saves time series data (telemetry) to a specified ThingsBoard entity, supporting simple JSON, timestamped objects, or arrays.

Inputs

  • authentication — Authentication method (API Key or Username/Password).
  • entityId (required) — The ID of the entity to save telemetry to (e.g., a Device ID).
  • entityType — The type of the entity (default: DEVICE).
  • telemetryJson (required) — Telemetry data in JSON format. Supports: 1) Simple format: {"temperature": 26}, 2) With timestamp: {"ts":1634712287000,"values":{"temperature":26}}, 3) Array: [{"ts":1634712287000,"values":{"temperature":26}}].

Output shape

A single status message object indicating success (e.g., {"status": "Telemetry submitted successfully"}).

The operation returns an HTTP 200 response on success; failures are thrown as errors.

Examples

Example 1: Save a simple temperature reading to a device.

Entity Type: DEVICE, Entity ID: , Telemetry JSON: {"temperature": 26.5}

Example 2: Save telemetry with a specific timestamp.

Entity Type: DEVICE, Entity ID: , Telemetry JSON: {"ts": 1634712287000, "values": {"temperature": 26.5}}

Example 3: Save an array of telemetry entries.

Entity Type: DEVICE, Entity ID: , Telemetry JSON: [{"ts": 1634712287000, "values": {"temperature": 26.5}}, {"ts": 1634712297000, "values": {"temperature": 27.0}}]

Links

Discussion