http
REST API routes definition
Functions:
-
route_get_devices–Route to get all devices
-
route_get_latest_locations_by_device_name–Function to get latest locations for a given device
-
route_get_locations–Route to get all locations
-
route_get_locations_by_device_name–Function to get locations for a given device (including input filters)
-
route_get_ping–Route to ping api
-
route_get_time–Route to get server time
-
route_get_version–Route to get version
route_get_devices
route_get_devices() -> JSONResponse
Route to get all devices
Returns:
-
JSONResponse–All devices as JSON body
route_get_latest_locations_by_device_name
route_get_latest_locations_by_device_name(device_name: str | None = None) -> JSONResponse
Function to get latest locations for a given device
Parameters:
-
(device_namestr | None, default:None) –Device name
Returns:
-
JSONResponse–Latest locations
route_get_locations
route_get_locations(limit: int | None = None, start_dt: str | None = None, end_dt: str | None = None, order_desc: bool = True) -> JSONResponse
Route to get all locations
Returns:
-
JSONResponse–Locations corresponding to input filters as JSON body
route_get_locations_by_device_name
route_get_locations_by_device_name(device_name: str | None = None, limit: int | None = None, start_dt: str | None = None, end_dt: str | None = None, order_desc: bool = True) -> JSONResponse
Function to get locations for a given device (including input filters)
Returns:
-
JSONResponse–Locations corresponding to input filters + specific input device as JSON body
route_get_ping
route_get_ping() -> PlainTextResponse
Route to ping api
Returns:
-
PlainTextResponse–pong if successful, nothing if network or server-side issue(s)
route_get_time
route_get_time() -> PlainTextResponse
Route to get server time
Returns:
-
PlainTextResponse–Current time as text body
route_get_version
route_get_version() -> JSONResponse
Route to get version
Returns:
-
JSONResponse–Project version as JSON body