Skip to content

REST API Overview

The device provides a JSON REST API on port 80 for programmatic control and monitoring.

Base URL

http://<device-ip>

All endpoints accept and return JSON (Content-Type: application/json) unless otherwise noted.

Error Handling

HTTP Status Description
200 Success
202 Accepted (asynchronous operation started)
400 Bad Request — invalid input or parameters
405 Method Not Allowed — wrong HTTP method
409 Conflict — operation already in progress
500 Internal Server Error
503 Service Unavailable

Error responses are returned as plain text with a descriptive message.

Examples

The examples in this section use curl. Replace <device-ip> with your device's IP address.

# Query system status
curl http://<device-ip>/api/system/status

# POST with JSON body
curl -X POST -H "Content-Type: application/json" \
  -d '{"state": 1}' \
  http://<device-ip>/api/switch