Get the trend of time in overuse

GET /api/filters/overuse_trend

Compare the time in overuse for the requested interval vs the typical all-time overuse for the same interval.

Query parameters

  • filter string

    criteria to filter by

  • start string Required

    ISO8601 formatted date marking the start of the current period

  • end string Required

    ISO8601 formatted date marking the end of the current period

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • data object

      Trend of overuse data

      Hide data attributes Show data attributes object
      • overuse_count object

        Change in number of cycles completed in the current period vs all time average.

        Hide overuse_count attribute Show overuse_count attribute object
        • data object

          Information about all time value, current value, and percentage of change between them.

          Hide data attributes Show data attributes object
          • all_time number

            All-time value of the requested trend.

          • current_period number

            Value of the requested trend for the current period.

          • pct_change number

            Float value with the percentual difference between current period and all-time.

      • overuse_cycles object

        Change in number of cycles completed in the current period vs all time average.

        Hide overuse_cycles attribute Show overuse_cycles attribute object
        • data object

          Information about all time value, current value, and percentage of change between them.

          Hide data attributes Show data attributes object
          • all_time number

            All-time value of the requested trend.

          • current_period number

            Value of the requested trend for the current period.

          • pct_change number

            Float value with the percentual difference between current period and all-time.

      • overuse_time object

        Change in number of cycles completed in the current period vs all time average.

        Hide overuse_time attribute Show overuse_time attribute object
        • data object

          Information about all time value, current value, and percentage of change between them.

          Hide data attributes Show data attributes object
          • all_time number

            All-time value of the requested trend.

          • current_period number

            Value of the requested trend for the current period.

          • pct_change number

            Float value with the percentual difference between current period and all-time.

  • 400 application/json

    Bad Request

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

  • 401 application/json

    Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

GET /api/filters/overuse_trend
curl \
 --request GET 'http://localhost:4000/api/filters/overuse_trend?start=string&end=string' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "data": {
    "overuse_time": {
      "all_time": 1000,
      "pct_change": 25,
      "current_period": 1250
    },
    "overuse_count": {
      "all_time": 100,
      "pct_change": -25,
      "current_period": 75
    },
    "overuse_cycles": {
      "all_time": 10,
      "pct_change": -50,
      "current_period": 5
    }
  }
}
Response examples (200)
{
  "data": {
    "overuse_time": {
      "all_time": 1000,
      "pct_change": 25,
      "current_period": 1250
    },
    "overuse_count": {
      "all_time": 100,
      "pct_change": -25,
      "current_period": 75
    },
    "overuse_cycles": {
      "all_time": 10,
      "pct_change": -50,
      "current_period": 5
    }
  }
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}