API Reference¶
Control your devices programmatically via HTTP and MQTT
Authentication¶
All API requests require a Device Token (found in dashboard → Device → Token Info)
Header: X-Device-Token: oc_perm_xxxxxxxxxxxx
HTTP API Endpoints¶
Get Device State¶
GET https://oceanremote.net/api/device/state/?token=YOUR_TOKEN
Response: ```json { "success": true, "relay1": false, "relay2": true, "temperature": 23.5, "humidity": 62.0 }