Skip to main content

Get Safety Events

GET 

/api/v1/analytics/safety-events

Per-bucket occurrence counts for four safety event groups (safety_stop, error, emergency_stop, manual_interaction) over a time window. An occurrence is a rising edge — one count each time the robot enters a tracked state, regardless of how long it stays there. When export=true the response is an XLSX file download instead of JSON.

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.

    export string

    Possible values: [true, false]

    When true, returns an XLSX file download (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) with columns: date, safety_stop, error, emergency_stop, manual_interaction. When false or omitted, returns the standard JSON response.

Responses​

JSON occurrence counts (default) or CSV file download (when export=true)

Schema
    success booleanrequired
    message stringrequired
    data objectrequired
    window objectrequired
    start_timestamp stringrequired
    end_timestamp stringrequired
    granularity stringrequired

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

    buckets string[]required
    bucket_ranges object[]required
  • Array [
  • start stringrequired
    end stringrequired
  • ]
  • series objectrequired
    safety_stop objectrequired
    total numberrequired
    data number[]required
    error objectrequired
    total numberrequired
    data number[]required
    emergency_stop objectrequired
    total numberrequired
    data number[]required
    manual_interaction objectrequired
    total numberrequired
    data number[]required
    status numberrequired
Loading...