Status Logger API

Authenticated API endpoint for logging sensor status data

POST/api/status
Log a new status entry

Headers

x-api-key: your-api-key

Request Body

{
  "unique_id": "SENSOR-001",
  "motion_status": true,
  "panic_status": false,
  "fire_status": false
}

Response

{
  "success": true,
  "data": {
    "guid": "a1b2c3d4-...",
    "reference_number": 1001,
    "unique_id": "SENSOR-001",
    "motion_status": true,
    "panic_status": false,
    "fire_status": false,
    "timestamp": "2024-01-15T..."
  }
}
GET/api/status
Retrieve status logs

Query Parameters

  • unique_id - Filter by device ID
  • reference_number - Find by reference
  • guid - Find by GUID
  • limit - Max results (default: 50)

Example

GET /api/status?unique_id=SENSOR-001&limit=10
API Tester
Test the POST endpoint. Use API key: sk_test_initial_key_12345
Authentication

All API requests require an API key passed via the x-api-key header.

Each log entry is assigned a unique GUID and an auto-incrementing reference number (starting from 1001) for easy tracking.