Skip to content

Create peel off report

Request

Create a peel off report for a given time range and set of monitors.

Security
api_key
Bodyapplication/jsonrequired

request peel off data for a set of monitors and a given time range.

endDatestring, (date)

It is the upper bound of the date range for which to return data. The endDate is non-inclusive; i.e, the returned data will be for dates from startDate to endDate-1. If provided will take precedence over endAt.

isOpenboolean

Flag to filter output within site opening hour window

Default:false
peelOffMonitorIdsArray of strings, (uuid)

List of peel off monitor ids in the report. At least one id is required.

startDatestring, (date)

It is the lower bound of the date range for which to return data. The startDate is inclusive; i.e, the returned data will be for dates from startDate to endDate-1.

timeGrainstring

The time window in the requested range to for data aggregation. Time grains below 1h are only available for the most recent 6 months of data. When startDate is more than 6 months in the past only 1h, 6h and 24h are accepted; such requests are served from hourly rollups which may exclude the most recent day.

Default:"1h"
Enum:"1s""1m""5m""15m""30m""1h""6h""24h"
curl -i -X POST \
  https://coreapi.hoxton.ai/_mock/v1/peel-off-reports \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "endDate": "2019-08-24",
    "isOpen": false,
    "peelOffMonitorIds": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "startDate": "2019-08-24",
    "timeGrain": "1s"
  }'

Responses

OK

Bodyapplication/json
Array [
baseinteger or nullread-only
idstring, (uuid)read-only
namestringread-only
peelOffinteger or nullread-only
ratenumber or null, (float64)read-only
timestring, (date-time)read-only
]
Response
[ { "base": 0, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "peelOff": 0, "rate": 0, "time": "2019-08-24T14:15:22Z" } ]