Skip to content

Create people count report

Request

Create a report of people counts for a given time range and set of monitors.

Security
api_key
Bodyapplication/jsonrequired

request people count 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.

isOpenboolean

Flag to filter output within site opening hour window

Default:false
peopleCountMonitorIdsArray of strings, (uuid)

List of people count 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/people-count-reports \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "endDate": "2019-08-24",
    "isOpen": false,
    "peopleCountMonitorIds": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "startDate": "2019-08-24",
    "timeGrain": "1s"
  }'

Responses

OK

Bodyapplication/json
Array [
direction1Aliasstringread-only
direction1Countinteger or nullread-only
direction2Aliasstringread-only
direction2Countinteger or nullread-only
monitorNamestringread-only
peopleCountMonitorIdstring, (uuid)read-only
timestring, (date-time)read-only
]
Response
[ { "direction1Alias": "string", "direction1Count": 0, "direction2Alias": "string", "direction2Count": 0, "monitorName": "string", "peopleCountMonitorId": "af5c9ece-4147-4fc4-9db3-7065170e641f", "time": "2019-08-24T14:15:22Z" } ]