0% found this document useful (0 votes)
14 views2 pages

End Points

The document outlines various vehicle status endpoints, including definitions for stopped, moving, parking, and idle states. It details how to retrieve data such as distance, odometer readings, fuel levels, and driving times from specific API endpoints. Additionally, it explains how to track speed metrics, temperature readings, and geofence events using provided URLs and logic references within the application.

Uploaded by

raspi.project13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

End Points

The document outlines various vehicle status endpoints, including definitions for stopped, moving, parking, and idle states. It details how to retrieve data such as distance, odometer readings, fuel levels, and driving times from specific API endpoints. Additionally, it explains how to track speed metrics, temperature readings, and geofence events using provided URLs and logic references within the application.

Uploaded by

raspi.project13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

EndPoints

for Vehicule : stopped , moving , parking or idle from /api/positions


explalantion :
stopped is when the ignition = false and speed zero .
moving : ignition true and speed more than 0
parking : ignition false
idle : speed zero and ignition = true

Route :
Distance : from summary end point
address : matqishach
pilote rah mqad : from drivers endpoint but you have to add the deviceId to fetch the driver
for that deviceId
Odometer : api/positions endpoint
fuel level : "fuelLevelPercentage" from positions endpoint
Consumption : from summary end point "fuelSpent" hado li "" rah attributes f response.

Temp de contuite :
Driving time : "engineHours" fiha problem hoa khasha formate dialha sinon ay3tik raqm kbir ,
from summary end point , check "src/reports/suumaryReportPage.jsx" to understand the
logic .
-idle time is the total of time for that day the vehicule was idle and not moving . from
positions end point ; use this explanation to understand

same for parking time

Vitesse :
max speed and average speed from positions endpoint
overspeed is an event when the speed limmite was exceeded it s in
reports/eventreportpage.jsx u can find here the logic .
as for the endpoint /api/event/{id} because the device can be modied and add to it events
and based on those event you will get notifications ,you can use the endpoint to fetch when
the max speed was
http://localhost:3000/api/reports/events?deviceId=8&from=2024-10-
01T23%3A00%3A00.000Z&to=2024-10-02T22%3A59%3A59.999Z&type=deviceOverspeed
this is an example of a device that has the type deviceoverspeed i got it from inspect
element of reports/events path in the web , i don t think you will need this but u must
understand it .

http://localhost:3000/api/reports/trips?deviceId=3&from=2024-10-
01T23%3A00%3A00.000Z&to=2024-10-02T22%3A59%3A59.999Z
and this is the end point GET to get the actual number of over speed and the
tripreportspage.jsx or the logic on it will handle fetching the maximum speed the vehicules
reached

for temerature :
in api/positions ; there is 4 of them , one of them u can test with it it s in duster_temp devices
, point on this deviceId and you will get the temp i think it s in C°
if there is a zer ovalue display it , if there is null display no data .

for geofence entered ; i want to display the name of the geofence for example if you go to
http://localhost:3000/reports/event and chosed event type geofence entered and exited , and
columns ( type ) the type is either exite or enter , the column is the actual name of the
geozone , for example emsigeozone ..etc
http://localhost:3000/api/reports/events?deviceId=3&from=2024-09-
30T23%3A00%3A00.000Z&to=2024-10-
01T22%3A59%3A59.999Z&type=geofenceExit&type=geofenceEnter
this is from the inspect element for duster .

use the reports pages in the interface to get what you want and find the endpoint get
methode easily from the inspect element .

You might also like