- 小柔享睡
- 用户模块
- 设备模块
- 协议管理
- 版本管理
- 音乐管理
- 睡眠模块
- 阿里云
- 首页
- 意见反馈2.0
- 冥想模块
- gpt
- 配置管理
- 开放平台
修改睡眠管理(2.0)
开发中
POST
/api/rlSleep/set
请求参数
Header 参数
token
string
必需
示例值:
92c38bc4785a4e9da7b91490a5e47efa
channel
string
可选
默认值:
HOSPITAL_SAAS
Body 参数application/json
id
string
睡眠报告id
meditationId
string
冥想课程id
meditationName
string
冥想课程名称
sleepName
string
睡眠名称
sleepType
string
睡眠类型 小憩 NAP 夜间享睡NIGHT
sleepTime
string
休息时间
isReinforceMemory
string
是否加强记忆力 Y是 N否
isImprovementSleep
string
是否改善睡眠 Y是 N否
isWake
string
是否开启 唤醒 Y是 N否
isSnore
string
是否开启鼾声
isBedtimeReminder
string
是否开启就寝提醒
bedtimeReminderTime
string
是否开启就寝提醒
status
string
是否是常用 Y是 N否
isMusicStatus
string
是否开启音乐 Y是 N否
deviceList
array [object {2}]
设备
id
string
必需
deviceNumber
string
必需
sleepMusicList
array [object {2}]
睡眠音乐
musicId
string
可选
musicNum
string
可选
示例
{
"id": 1,
"sleepName": "睡眠1",
"sleepType": "NAP",
"sleepTime": "09:00:00",
"isFallAsleep": "Y",
"musicId": 1,
"isSleeping": "Y",
"isWake": "Y",
"deviceList": [
{
"id": 1,
"deviceNumber": "SN-1234"
}
]
}
示例代码
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/rlSleep/set' \
--header 'token: 92c38bc4785a4e9da7b91490a5e47efa' \
--header 'token;' \
--header 'channel: HOSPITAL_SAAS' \
--header 'Content-Type: application/json' \
--data-raw '{ "id":1,
"sleepName": "睡眠1",
"sleepType": "NAP",
"sleepTime": "09:00:00",
"isFallAsleep": "Y",
"musicId": 1,
"isSleeping": "Y",
"isWake": "Y",
"deviceList": [{"id":1,"deviceNumber":"SN-1234"}]
}'
返回响应
🟢200成功
application/json
Body
id
integer
睡眠计划ID
meditationId
string