audio.ring.updateList(全量更新自定义铃声列表)
audio.ring.updateList:全量更新自定义铃声列表
audio.ring.updateList · 设备级 · 权限 Config
功能详情
用 soundInfoList 全量替换本机自定义铃声列表。inputData.soundInfoList 为最多 100 元素的 array;下表 soundInfoList.item.* 表示 数组元素 struct 字段(JSON 键名为 name/url/index/soundType/relateType,无 item. 前缀)。数组元素 index 0~255(与 property item.index 0~999999 不同档)。铃声类型:updateList[].soundType · 新增铃声 inputData.type · property item.type。
请求地址
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.service.invoke
最小权限
管理员操作自己绑定的设备不需要权限。操作被分享设备需要基础配置权限。子用户绑定不需要。子账号需要 Config。超时不代表未执行。
传入参数说明
| 参数名 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
token | String | 是 | 管理员、子用户或子账号 accessToken |
deviceId | String | 是 | 设备序列号 |
productId | String | 否 | 可省略。传了且与该设备实际型号不一致 → DV2009 |
serviceId | String | 是 | audio.ring.updateList |
inputData | Object | 是 | 见下表 |
| 参数名 | 说明 | 类型 | 必填 | 取值 |
|---|---|---|---|---|
soundInfoList | 铃声列表。最多 100 条。 | array | 是 | 最多 100 条 |
soundInfoList.item.name | 铃声名称。 | text | 是 | 字符串 |
soundInfoList.item.url | 铃声地址。下载或文件地址。 | text | 是 | 字符串 |
soundInfoList.item.index | 铃声索引。范围 0~255,步长 1。 | int | 是 | 0~255,步长 1 |
soundInfoList.item.soundType | 铃声类型。0 wav,1 pcm,2 aac。 | enum | 是 | 0 wav;1 pcm;2 aac |
soundInfoList.item.relateType | 生效类型。0 设备,1 配件,2 自动回复,3 设备本地铃声,4 快捷回复,5 门铃关联铃铛,6 全部类型。 | enum | 是 | 0 设备;1 配件;2 自动回复;3 设备本地铃声,按下门铃后的响声;4 快捷回复;5 门铃关联铃铛的铃声;6 全部类型 |
样例输入
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"system": {
"ver": "1.0",
"appId": "lcdxxxxxxxxx",
"sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
"time": 1706511734,
"nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
},
"params": {
"token": "<yourAccessToken>",
"deviceId": "TESTIPC000012345",
"serviceId": "audio.ring.updateList",
"inputData": {
"soundInfoList": [
{
"name": "ring-1",
"url": "https://example.com/ring.wav",
"index": 1,
"soundType": "0",
"relateType": "0"
}
]
}
}
}
返回 data 字段说明
出参在 result.data.outputData。无出参为 {}。
样例输出
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"result": {
"code": "0",
"msg": "Operation is successful",
"data": {
"outputData": {}
}
}
}
错误码
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
SN1001 | 签名校验异常 | 按 HTTP 开发规范 核对 sign |
TK1002 | token 无效或过期 | 重新获取 accessToken |
OP1002 | 缺少必填参数 | 补必填字段 |
OP1003 | 参数不合法 | 按本页参数表核对 |
OP1009 | 权限不足 | 核对 token 与设备绑定/分享权限 |
OP1013 | 接口总次数超限 | 降低调用频率 |
OP1014 | 接口日限额超限 | 见 接口调用限额 |
DV1007 | 设备离线 | 等设备上线 |
更多见 错误码 · OP/SN/TK。
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
DV2003 | 设备未声明该能力 | 以 device.capability.list 为准 |
DV2007 | channelId 与 scope 不符 | 通道级必传,设备级不传 |
DV2008 | 同请求混用设备级与通道级 | 拆分请求 |
DV2009 | productId 与型号不一致 | 省略或改为实际型号 |
DV2011 | 无能力权限 | 见 权限码 |
更多见 能力错误码。
