Skip to content

The Data API is used to query, export, and manage data collected by USV.

GET /api/v1/data/telemetry

Query Parameters:

  • device - Device ID (required)
  • start - Start time (ISO 8601)
  • end - End time (ISO 8601)
  • since - Relative time (e.g., “1h”, “30m”)
  • limit - Number of records to return

Example:

Terminal window
curl -X GET \
'http://localhost:8080/api/v1/data/telemetry?device=USV-2024-001&since=1h&limit=100' \
-H 'Authorization: Bearer <token>'

Response:

{
"success": true,
"data": [
{
"timestamp": "2024-01-15T10:30:00Z",
"latitude": 31.2304,
"longitude": 121.4737,
"altitude": 0,
"speed": 5.2,
"heading": 90,
"battery": 78
},
...
]
}
GET /api/v1/data/sensors

Query Parameters:

  • device - Device ID
  • type - Sensor type
  • parameter - Parameter name
  • start / end - Time range

Example:

Terminal window
curl -X GET \
'http://localhost:8080/api/v1/data/sensors?device=USV-2024-001&type=water_quality&parameter=ph'
POST /api/v1/data/export

Request Body:

{
"device_id": "USV-2024-001",
"data_type": "sensors",
"format": "csv",
"start_time": "2024-01-15T00:00:00Z",
"end_time": "2024-01-15T23:59:59Z"
}

See more at Data Management Guide.

Table of Contents

Pages