Get facility utilization timeline

GET /api/facilities/{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, summed for all booths in the facility.

Path parameters

  • id string Required

    id of the facility

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/facilities/{id}/utilization_timeline
curl \
 -X GET http://localhost:4000/api/facilities/{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"
}