X7 设备接口文档

独立后端 5030 · http://47.116.111.12/x7/ · 设备ID: 867561087286145

API 接口

基础

GET /x7/api/health
健康检查
GET /x7/api/user-devices/{device}/realtime
绑定设备实时数据

设备数据

GET /x7/api/x7/realtime?device=xxx
实时数据查询
GET /x7/api/x7/diagnose?device=xxx
设备诊断

睡眠报告

GET /x7/api/x7/sleep/daily?device=xxx&date=
每日睡眠报告
GET /x7/api/x7/sleep/report-index?device=xxx&startDate=&endDate=
报告索引
GET /x7/api/x7/sleep/comparison?device=xxx&type=week&startDay=&endDay=
睡眠对比

预警

GET /x7/api/x7/warnings?device=xxx
预警列表

设置 (查询+保存)

GET /x7/api/x7/settings/alert?device=xxx
查询预警设置
POST /x7/api/x7/settings/alert
保存预警设置
GET /x7/api/x7/settings/monitor?device=xxx
查询监控设置
POST /x7/api/x7/settings/monitor
保存监控设置
GET /x7/api/x7/settings/whitelist?device=xxx
查询白名单
POST /x7/api/x7/settings/whitelist
保存白名单
GET /x7/api/x7/settings/reminders?device=xxx
查询提醒列表
POST /x7/api/x7/settings/reminders
保存提醒设置

设备控制 (主后端路由)

POST /api/x7/emergency-call
发起紧急呼叫
POST /api/x7/device/command
下发设备命令
POST /api/x7/device/upload-interval
设置上报周期