文档
测试

获取睡眠报告列表

POST
GetSleepReportsByDateRange

接口描述

获取睡眠报告列表

请求参数

参数名
类型
描述
必填
dataJson
object
数据参数 添加
必填
key
string
秘钥:29c0b6ed48d52c76122cc003fd79383c
必填
mac
string
设备WIFI-MAC 可为空,空为获取全部,不为空获取指定
可选
start_date
string
起始日期
必填
end_date
string
结束日期
必填

响应参数

参数名
类型
描述
必填
data
array
数据列表
必填
id
int
报告ID 示例:27
必填
wifi_mac
string
mac地址 示例:C4:DE:E2:28:50:64
必填
sleep_score
int
评分 示例:0
必填
in_bed_duration
int
在床时长 示例:0
必填
sleep_duration
int
睡眠时长 示例:0
必填
deep_sleep_duration
int
深睡时长 示例:0
必填
start_date
string
开始时间 示例:2023-09-03 16:16
必填
end_date
string
结束时间 示例:2023-09-03 16:17
必填
turn_count
int
翻身次数 示例:0
必填
snroe_duration
int
鼾声时长 示例:0
必填
ret
int
示例:0
必填
err_code
int
示例:0
必填
msg
string
示例:ok
必填

说明 / 示例

## 接口地址 https://xxxx.com/WebServiceForDoctor.asmx ## 成功返回示例 新 ```language { "data": [{ "id": 27, "wifi_mac": "C4:DE:E2:28:50:64", "sleep_score": 0, "in_bed_duration": 0, "sleep_duration": 0, "deep_sleep_duration": 0, "start_date": "2023-09-03 16:16", "end_date": "2023-09-03 16:17", "turn_count": 0, "snroe_duration": 0 }, { "id": 28, "wifi_mac": "C4:DE:E2:28:50:64", "sleep_score": 78, "in_bed_duration": 79, "sleep_duration": 69, "deep_sleep_duration": 69, "start_date": "2023-09-03 14:37", "end_date": "2023-09-03 15:56", "turn_count": 12, "snroe_duration": 22 }], "ret": 0, "err_code": 0, "msg": "ok" } ``` >i 注:ret = 0 为成功 ## 失败返回示例 ```language { "ret": 4, "msg": "参数不能为空", "err_code": 10008 } ``` >d 注:ret > 0 为失败 ## 错误编号(errCode): 6 have no permission 9 解析Json出错 35 Mac格式错误 48 起始日期大于结束日期 49 起始日期至结束日期范围大于7天 50 起始日期超出最近30天日期 10008 参数不能为空 10016 Key错误