Skip to content

Create dwell time report

Request

Create a report of dwell time for a given time range and given organisation

Security
api_key
Bodyapplication/jsonrequired

request dwell time data for an organisation and a given time range.

endDatestring, (date)required

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

occupancyMonitorIdsArray of strings, (uuid)

List of occupancy monitor ids in the report.

organisationIdstring, (uuid)required
peopleCountMonitorIdsArray of strings, (uuid)

List of people count monitor ids in the report.

startDatestring, (date)required

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. Dwell time reports are only available for the most recent 6 months of data; a startDate more than 6 months in the past is rejected.

curl -i -X POST \
  https://coreapi.hoxton.ai/_mock/v1/dwell-time-reports \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "endDate": "2019-08-24",
    "occupancyMonitorIds": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98",
    "peopleCountMonitorIds": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "startDate": "2019-08-24"
  }'

Responses

OK

Bodyapplication/json
createdAtstring, (datetime)
dwellTimeReportIdstring, (uuid)
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

errorMessagestring

error in dwell time report.

occupancyMonitorIdsArray of strings, (uuid)

List of occupancy monitor ids in the report.

organisationIdstring, (uuid)
peopleCountMonitorIdsArray of strings, (uuid)

List of people count monitor ids in the report.

reportDataArray of objects(DwellTimeData)
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

statusstring
Enum:"completed""completed_with_errors""pending"
Response
{ "createdAt": "string", "dwellTimeReportId": "cc3abed8-7b0e-446e-98c2-20f9781cd5e6", "endDate": "2019-08-24", "errorMessage": "string", "occupancyMonitorIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98", "peopleCountMonitorIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], "reportData": [ {} ], "startDate": "2019-08-24", "status": "completed" }