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

NameRequiredDescription
tokenYesValid access token
dayYesDay of the month
monthYesMonth (1-12)
yearNoYear, default: current year
hourNoLimit result to only specific hour, default: receive data for all hours of the day
tzNoChosen 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=6

Example 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

NameTypeDescription
sensorstringSensor ID
daystringDay of the month
monthstringMonth
yearstringYear
hourstringHour, in the format HH:mm
datestringFull Date, in the format YYYY-MM-DD HH:mm:ss
objectsCountnumberNumber of total detected objects
peopleCountnumberNumber of people objects
micromobilityCountnumberNumber of micromobility objects
vehiclesCountnumberNumber of vehicles objects