Hour
Get the total amount of detected objects from your sensor(s) divided into hours.
Endpoint URL
GET
/v2/statistics/hour
💡
Each day start from 00:00 - 23:59
Query parameters
| Name | Required | Description |
|---|---|---|
token | Yes | Valid access token |
day | Yes | Day of the month |
month | Yes | Month (1-12) |
year | No | Year, default: current year |
hour | No | Limit result to only specific hour, default: receive data for all hours of the day |
tz | No | Chosen time zone (List of tz database time zones), default: IL |
⏰
If you call this endpoint without hour parameter you will receive data from
the start of the day until the current hour of the day
Example request
$ curl https://api.roadsense.tech/v2/statistics/hour&token={your_access_token}&day=12&month=6Example response
[ [ { sensor: "5000a0cc2bfdd33c", day: "12", month: "6", year: "2021", hour: "00:00", objectsCount: 2, peopleCount: 2, micromobilityCount: 0, vehiclesCount: 0, }, { sensor: "5000a0cc2bfdd33c", day: "12", month: "6", year: "2021", hour: "01:00", objectsCount: 9, peopleCount: 6, micromobilityCount: 1, vehiclesCount: 2, }, { sensor: "5000a0cc2bfdd33c", day: "12", month: "6", year: "2021", hour: "02:00", objectsCount: 0, peopleCount: 0, micromobilityCount: 0, vehiclesCount: 0, }, { sensor: "5000a0cc2bfdd33c", ... }, ], [ { sensor: "600a0c2a69e6049c", ... }, ]]Response fields
| Name | Type | Description |
|---|---|---|
sensor | string | Sensor ID |
day | string | Day of the month |
month | string | Month |
year | string | Year |
hour | string | Hour, in the format HH:mm |
date | string | Full Date, in the format YYYY-MM-DD HH:mm:ss |
objectsCount | number | Number of total detected objects |
peopleCount | number | Number of people objects |
micromobilityCount | number | Number of micromobility objects |
vehiclesCount | number | Number of vehicles objects |