Get modes duration

GET /api/booths/{id}/duration_by_mode

Allows you to retrieve the list of modes and their duration for a given booth in a given date range.

Path parameters

  • id string Required

    id of the booth

Query parameters

  • from string Required

    an ISO8601 formatted date to query data from

  • to string Required

    an ISO8601 formatted date to query data until

Responses

  • OK

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

      List of durations per booth mode

      Hide data attributes Show data attributes object
      • duration number

        Interval of time in minutes

      • mode string

        Name of the mode the booths were on

      • Percentage of duration with respect all modes

  • 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}/duration_by_mode
curl \
 -X GET http://localhost:4000/api/booths/{id}/duration_by_mode?from=string&to=string
Response examples (200)
{
  "data": [
    {
      "mode": "Spray Mode",
      "duration": 5.0,
      "percentage": 55.0
    }
  ]
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}