Get utilization timeline

GET /api/booths/{id}/utilization_timeline

Allows you to retrieve the requested number of time buckets between a given date range with the total minutes spent on each state for each bucket, including active spray time.

Path parameters

  • id string Required

    id of the booth

Query parameters

  • start string Required

    ISO8601 formatted date to query data from

  • interval string Required

    Interval size of each data point in minutes

  • end string Required

    ISO8601 formatted date to query data until

Responses

  • OK

    Hide response attribute Show response attribute object
    • data array[object]

      Series of runtime minutes aggregated in time buckets depending on the datapoints

      Hide data attributes Show data attributes object
      • duration number

        Total duration of the time bucket

      • modes array[object]

        List of modes and durations spent on such modes.

        Hide modes attributes Show modes attributes object
        • duration number

          Number of minutes in the time bucket spent in the mode

        • mode string

          Name of a mode seen

      • ISO8601 formatted timestamp

  • Bad request

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

  • Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

GET /api/booths/{id}/utilization_timeline
curl \
 -X GET http://localhost:4000/api/booths/{id}/utilization_timeline?start=string&interval=string&end=string
Response examples (200)
{
  "data": [
    {
      "duration": 42.0,
      "modes": [
        {
          "mode": "Spray Mode",
          "duration": 30
        }
      ],
      "timestamp": "string"
    }
  ]
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}