Skip to main content

Get Robot State Distribution

GET 

/api/v1/analytics/robot-state-distribution

Time spent in each of the seven robot states over a window, as overall totals and per-bucket durations. Uses the same carry-forward state measurement as /robot-state-timeline, then slices each state interval across bucket boundaries so every bucket holds the milliseconds spent in each state.

Request​

Query Parameters

    start_timestamp stringrequired

    Mandatory. Inclusive window start — ISO 8601 datetime or epoch milliseconds.

    end_timestamp stringrequired

    Mandatory. Inclusive window end — ISO 8601 datetime or epoch milliseconds.

    granularity string

    Possible values: [2hour, day, 3day, 9day, 30day, auto]

    Bucket size. auto derives the bin from the span: 1 d → 2-hour bins, 7 d → 1-day, 30 d → 3-day, 90 d → 9-day, 360 d → 30-day, other spans → ceil(days/12) snapped to the nearest level. Defaults to auto.

    tz string

    IANA timezone. When set, buckets are local calendar days (or 2-hour slots) aligned to the local midnight of start_timestamp, and multi-day buckets count from that day. When omitted, buckets are UTC-aligned.

Responses​

Successful response with per-state totals and per-bucket durations (ms)

Schema
    success booleanrequired
    message stringrequired
    data objectrequired
    window objectrequired
    start stringrequired
    end stringrequired
    elapsed_ms numberrequired
    tracked_ms numberrequired
    coverage_pct numberrequired
    granularity stringrequired

    Possible values: [2hour, day, 3day, 9day, 30day]

    states object[]required
  • Array [
  • key stringrequired
    val numberrequired
    duration_ms numberrequired
    percentage numberrequired
  • ]
  • buckets string[]required
    bucket_ranges object[]required
  • Array [
  • start stringrequired
    end stringrequired
  • ]
  • series objectrequired
    property name* number[]
  • Array [
  • number

  • ]
  • status numberrequired
Loading...