子设备
更新时间: 2023-04-19
# 获取可绑定子设备列表
# 基本信息
Path: /v1/devices/:instanceId/:productKey/subsets
Method: GET
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey |
Query
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
pageNo | 是 | ||
pageSize | 是 | ||
name | 否 | 搜索名称(未绑定网关设备的子设备name以及alias) | |
subProductKey | 是 | subProductKey 子产品key | |
deviceName | 是 | deviceName 网关设备名称 |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
totalCount | number | 非必须 | |||
result | object [] | 非必须 | |||
├─ instanceId | string | 必须 | |||
├─ deviceType | string | 必须 | |||
├─ deviceSecret | string | 必须 | |||
├─ productName | string | 必须 | |||
├─ updateTime | string | 必须 | |||
├─ last_online_time | string | 必须 | |||
├─ active_time | string | 必须 | |||
├─ authType | string | 必须 | |||
├─ productKey | string | 必须 | |||
├─ createTime | string | 必须 | |||
├─ alias | string | 必须 | |||
├─ active_state | boolean | 必须 | |||
├─ enable_state | string | 必须 | |||
├─ accessType | string | 必须 | |||
├─ deviceName | string | 必须 | |||
├─ online_state | string | 必须 | |||
├─ ban_state | string | 必须 | |||
pageNo | number | 非必须 | |||
pageSize | number | 非必须 |
# 导入子设备拓扑
# 基本信息
Path: /v1/devices/:instanceId/:productKey/:deviceName/subsets/import
Method: POST
接口描述:
# 请求参数
Headers
参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
---|---|---|---|---|
Content-Type | multipart/form-data | 是 |
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
deviceName |
Body
参数名称 | 参数类型 | 是否必须 | 示例 | 备注 |
---|---|---|---|---|
importFile | file | 是 |
# 返回数据
无
# 导出子设备拓扑
# 基本信息
Path: /v1/devices/:instanceId/:productKey/:deviceName/subsets/export
Method: POST
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
deviceName |
Body
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
string [] | 非必须 | ||||
├─ | 非必须 | deviceName |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
root | object | 非必须 | |||
├─ deviceName | string | 非必须 | |||
├─ alias | string | 非必须 | |||
├─ deviceType | string | 非必须 | |||
├─ productKey | string | 非必须 | |||
leaf | object [] | 非必须 | |||
├─ deviceName | string | 非必须 | |||
├─ alias | string | 非必须 | |||
├─ deviceType | string | 非必须 | |||
├─ productKey | string | 非必须 |
# 已绑定子设备列表
# 基本信息
Path: /v1/devices/:instanceId/:productKey/:deviceName/subsets
Method: GET
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
deviceName |
Query
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
pageNo | 是 | ||
pageSize | 是 | ||
name | 否 | 搜索名称 |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
totalCount | number | 非必须 | |||
result | object [] | 非必须 | |||
├─ instanceId | string | 必须 | |||
├─ deviceType | string | 必须 | |||
├─ deviceSecret | string | 必须 | |||
├─ productName | string | 必须 | |||
├─ updateTime | string | 必须 | |||
├─ last_online_time | string | 必须 | |||
├─ active_time | string | 必须 | |||
├─ authType | string | 必须 | |||
├─ productKey | string | 必须 | |||
├─ createTime | string | 必须 | |||
├─ alias | string | 必须 | |||
├─ active_state | boolean | 必须 | |||
├─ enable_state | string | 必须 | |||
├─ accessType | string | 必须 | |||
├─ deviceName | string | 必须 | |||
├─ online_state | string | 必须 | |||
├─ ban_state | string | 必须 | |||
pageNo | number | 非必须 | |||
pageSize | number | 非必须 |
# 批量绑定子设备
# 基本信息
Path: /v1/devices/:instanceId/:productKey/:deviceName/subsets
Method: POST
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
deviceName |
Body
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
object [] | 非必须 | ||||
├─ deviceName | string | 必须 | |||
├─ productKey | string | 必须 |
# 返回数据
无
# 批量解绑子设备
# 基本信息
Path: /v1/devices/:instanceId/:productKey/:deviceName/subsets/delete
Method: POST
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
deviceName |
Body
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
object [] | 非必须 | ||||
├─ deviceName | string | 必须 | |||
├─ productKey | string | 必须 |
# 返回数据
无