DEVICES
GET /api/devices
Return only devices owned by the authenticated user, including safe template, capability, state, telemetry and connection metadata.
Authentication
Use an authenticated browser session or the application headers X-API-Key and X-API-Secret.
Parameters
This endpoint currently returns the owner’s device collection without pagination. Use realtime updates instead of rapid polling.
Response
[
{"id":"uuid","device_code":"hap_example","name":"Office Light",
"type_slug":"dimmable-light","online":true,
"capabilities":[{"key":"power"},{"key":"brightness"}]}
]Examples
curl --fail-with-body https://homeautopro.in/api/devices \
-H "X-API-Key: hapk_YOUR_KEY_ID" \
-H "X-API-Secret: YOUR_API_SECRET"import requests
r = requests.get("https://homeautopro.in/api/devices", headers={
"X-API-Key": "hapk_YOUR_KEY_ID", "X-API-Secret": "YOUR_API_SECRET"
}, timeout=10)
r.raise_for_status()
devices = r.json()const r = await fetch("https://homeautopro.in/api/devices", {headers: {
"X-API-Key": "hapk_YOUR_KEY_ID", "X-API-Secret": "YOUR_API_SECRET"
}});
if (!r.ok) throw new Error(`HomeAutoPro ${r.status}`);
const devices = await r.json();