network.service.rtmpConfig(获取RTMP配置属性)
network.service.rtmpConfig:获取RTMP配置属性
network.service.rtmpConfig · 设备级 · 权限 Config
功能详情
读设备 RTMP 配置。含 stream、custom、ip、port、url。custom=0 时以 ip/port 为主,url 可返回空串;custom=1 时以 url 为主。与 RTMP 开关 无平台强制先后顺序,以设备能力为准。
请求地址
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.property.get
最小权限
管理员操作自己绑定的设备不需要权限。操作被分享设备须具备本能力 share_auth_code 所列权限之一(与控制台分享授权一致)。子用户绑定不需要。子账号需要 Config。详见 权限码。
传入参数说明
| 参数名 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
token | String | 是 | 管理员、子用户或子账号 accessToken |
deviceId | String | 是 | 设备序列号 |
productId | String | 否 | 可省略。传了且与该设备实际型号不一致 → DV2009 |
properties | Array | 是 | ["network.service.rtmpConfig"] |
样例输入
{
"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",
"properties": [
"network.service.rtmpConfig"
]
}
}
返回 data 字段说明
值在 result.data.properties["network.service.rtmpConfig"]。
| 参数名 | 说明 | 类型 | 必填 | 取值 |
|---|---|---|---|---|
stream | 码流。0 主码流,1 辅码流。 | enum | 是 | 0 主码流;1 辅码流 |
custom | 自定义模式。0 非自定义,1 自定义。 | enum | 是 | 0 非自定义;1 自定义 |
ip | 非自定义地址。 | text | 是 | 字符串 |
port | 非自定义端口。范围 0~9999,步长 1。 | int | 是 | 0~9999,步长 1 |
url | 自定义地址。下载或文件地址。 | text | 是 | 字符串;custom=0 时可为空 |
样例输出
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"result": {
"code": "0",
"msg": "Operation is successful",
"data": {
"properties": {
"network.service.rtmpConfig": {
"stream": "0",
"custom": "0",
"ip": "example",
"port": 0,
"url": "example"
}
}
}
}
}
错误码
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
SN1001 | 签名校验异常 | 按 HTTP 开发规范 核对 sign |
TK1002 | token 无效或过期 | 重新获取 accessToken |
OP1002 | 缺少必填参数 | 补必填字段 |
OP1003 | 参数不合法 | 按本页参数表核对 |
OP1009 | 权限不足 | 核对 token 与设备绑定/分享权限 |
OP1013 | 接口总次数超限 | 降低调用频率 |
OP1014 | 接口日限额超限 | 见 接口调用限额 |
DV1007 | 设备离线 | 等设备上线 |
更多见 错误码 · OP/SN/TK。
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
DV2003 | 设备未声明该属性 | 以 device.capability.list 为准 |
DV2004 | 写入值超出型号范围 | 核对 properties 取值 |
DV2007 | channelId 与 scope 不符 | 通道级必传,设备级不传 |
DV2008 | 同请求混用设备级与通道级 | 拆分请求 |
DV2009 | productId 与型号不一致 | 省略或改为实际型号 |
更多见 能力错误码。
