Skip to content
© 2026 The ThingsBoard Authors
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

Time-Series Data

Time-series data is a sequence of timestamped key-value pairs published by a device or computed by the platform. It represents continuously changing measurements — sensor readings, counters, state changes — where every data point matters, not just the latest.

Compared to attributes:

Attributes Time-series
Storage Latest value only Full history
Typical data Config, state Sensor readings
Queryable by time range No Yes
Aggregatable No Yes

Each time-series entry consists of:

  • Key — the measurement name (e.g., temperature)
  • Value — string, boolean, integer, double, or JSON
  • Timestamp — Unix epoch in milliseconds; auto-assigned by the server if not provided by the device

Simple payload:

{ "temperature": 26.5, "humidity": 78, "pressure": 1013.2 }

With explicit timestamp:

{ "ts": 1745000000000, "values": { "temperature": 26.5, "humidity": 78 } }

Devices publish time-series data over MQTT, HTTP, CoAP, LwM2M, and other protocols. Each protocol may use different payload format that is mapped to the same internal JSON format; only the transport mechanism differs. See the Connectivity guide for protocol-specific details.

Many protocols support multiple readings with different timestamps in a single message — useful for batching offline data or high-frequency sensors:

[
{ "ts": 1745000000000, "values": { "temperature": 25.1 } },
{ "ts": 1745000060000, "values": { "temperature": 25.4 } },
{ "ts": 1745000120000, "values": { "temperature": 26.0 } }
]


ThingsBoard stores time-series data in PostgreSQL by default. For high-volume deployments, Cassandra is supported as an alternative backend optimized for write-heavy workloads and long retention periods. A separate latest values table is maintained for fast access to the current readings.

To configure automatic data expiration (TTL), see Configure Time-Series Data Retention.

Capability Description Guide
Visualize on dashboards Plot history with time-series charts; display latest values on gauges, cards, and tables Dashboards
Trigger alarms Fire alarms when a value crosses a threshold Alarm rules
Process in Rule Engine Filter, enrich, transform, or route telemetry messages; forward to external systems Rule Engine
Compute derived values Calculate aggregations, delta, or any formula from raw telemetry Calculated Fields
Query via REST API Fetch latest values or historical data with time range and aggregation; delete specific ranges REST API