- 小柔享睡
- 用户模块
- 设备模块
- 协议管理
- 版本管理
- 音乐管理
- 睡眠模块
- 阿里云
- 首页
- 意见反馈2.0
- 冥想模块
- gpt
- 配置管理
- 开放平台
添加监测中事件(2.0)
开发中
POST
/api/rlSleepReport/add/event
请求参数
Header 参数
token
string
必需
示例值:
92c38bc4785a4e9da7b91490a5e47efa
channel
string
可选
默认值:
HOSPITAL_SAAS
Body 参数application/json
sleepReportId
string
睡眠报告id
deviceType
string
设备类型 0 头贴 1香薰 2头枕 3振动床
deviceName
string
设备蓝牙名称
eventType
string
事件类型 0 开始 1 结束 2 降低音量 3 调整振动床档位 4 中断-断开 5 重连 6 脱落 7 重新佩戴 8主动关闭闭环
eventText
string
事件内容(电量,挡位,信号强度)
createTime
string | null
事件产生事件
示 例
{
"sleepReportId": "90",
"deviceName": "振动床",
"deviceType": "3",
"eventType": "0",
"eventText": "1"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/rlSleepReport/add/event' \
--header 'token: 6e6f3a96328f454eb489906b71b5fb23' \
--header 'channel: HOSPITAL_SAAS' \
--header 'Content-Type: application/json' \
--data-raw '{
"sleepReportId": "90",
"deviceName": "振动床",
"deviceType":"3",
"eventType": "0",
"eventText": "1"
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{
"id": 1,
"memberId": 4,
"sleepName": "睡眠1",
"sleepType": "NAP",
"sleepTime": "09:00:00",
"isFallAsleep": "Y",
"musicId": 1,
"isSleeping": "Y",
"isWake": "Y",
"deviceList": [
{
"id": 1,
"sleepId": 1,
"deviceId": 1,
"deviceName": "头贴",
"deviceNumber": "SN-dsf1",
"deviceType": 0,
"createTime": "2022-09-14 21:23:39",
"updateTime": "2022-09-14 21:23:41"
}
]
}
修改于 2023-05-23 12:53:36