HomeGuidesAPI ReferenceChangelog
Log In
Changelog
Added

Events & complex queries in the Query block

The Query block can now shape a query around events — batches, statuses, tracking numbers — without writing JSON. Pick the event system, choose whether to group by event id or by event type, and the same block that returned a flat time series returns one window per event, with its duration or its raw samples.

What's new

  • Events panel — group by an event system of the twin, by id (one occurrence: a batch, a tracking number) or by type (every window of a status); load the available event ids over the timeframe and pick one; ask for each window's duration, or for the raw samples inside each window.
  • Aggregations that follow the windows — a mean per 10 minutes inside each status, or one value per window when the interval is left empty.
  • Preview Query — run the block as configured and read the result as a chart, a table or both, before saving anything.
  • Self-describing resultsPOST /dsapi/data/?include-format=true returns the columns with their types and roles (index, event, dimension, value) alongside the rows, so a client can render a result it has never seen.
  • From Pythonapi.query(datapoints=[...], group={"system_id": ..., "group_by": "type"}, field=["duration"]) returns the same frames the block previews.

Learn more

Events & Batches · Query step · Data endpoint