设备管理
获取设备列表
接口描述: 分页获取所有的设备信息
接口地址: https://yd.yunding360.com/openapi/devices/page
请求方式:GET
请求参数:
| 参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| page | 页数(从0开始计数,默认为0) | query | true | integer | |
| size | 每页数量(默认20) | query | true | integer | |
| capability | 设备能力 | query | false | integer | |
| containMediaSource | 是否包含媒体源地址 | query | false | boolean | |
| display | 设备是否可见 | query | false | boolean | |
| keyword | 搜索关键字(支持按名称和SN号进行搜索) | query | false | string | |
| name | 设备名称 | query | false | string | |
| online | 设备是否在线 | query | false | boolean | |
| sn | 设备SN编码 | query | false | string | |
| status | 设备状态,可用值:OPERATION,STOP,UNREPORTED | query | false | string | |
| storeId | 门店id | query | false | string |
响应示例:
{
"content": [
{
"capabilityList": [],
"channel": [
{
"chnno": 0,
"hotspot": true,
"ip": "",
"name": "",
"online": 0
}
],
"deviceArea": "",
"display": true,
"enterpriseId": "",
"id": "",
"inOutDirection": "",
"key": "",
"lastOnlineTime": 0,
"loginKey": "",
"mediaSource": "",
"name": "",
"online": true,
"relayHost": "",
"relayPort": 0,
"sn": "",
"storeAreaId": "",
"storeId": ""
}
],
"metadata": {
"page": 0,
"size": 0,
"totalElements": 0,
"totalPages": 0
}
}
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| content | array | DeviceInfo | |
| metadata | 分页信息 | PageMetadata | PageMetadata |
schema属性说明
DeviceInfo
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| capabilityList | 门店能力,可用值: HOTSPOT_V2_AUDIO_VIDEO, FACE_FLOW, HOTSPOT_VIDEO, FLOW_VIDEO, STORAGE_CARD, HOTSPOT_V2, FACE, HOTSPOT, FLOW, CLOUD, AUDIO, VIDEO, COMMON | array | |
| channel | 设备通道信息,包含多个设备通道信息的数组,单通道设备该字段为null | array | 设备通道 |
| deviceArea | 门店区域(店内/店外),可用值: INDOOR, OUTDOOR, NOT_FLOW, PATROL, LICENSE_PLATE | string | |
| display | 是否可见,true表示可见,false表示不可见 | boolean | |
| enterpriseId | 企业id | string(uuid) | |
| id | Id | string(uuid) | |
| inOutDirection | 进出方向 | string | |
| key | 设备KEY | string | |
| lastOnlineTime | 设备最后在线时间 | integer(int64) | |
| loginKey | 设备登陆码 | string | |
| mediaSource | 媒体源地址 | string | |
| name | 设备名称 | string | |
| online | 是否在线,true表示在线,false表示离线 | boolean | |
| relayHost | 转发服务器地址 | string | |
| relayPort | 转发服务器端口 | integer(int32) | |
| sn | 设备序列号 | string | |
| storeAreaId | 店内区域(位置) | string | |
| storeId | 门店id | string(uuid) |
设备通道
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| chnno | 序号 | integer(int32) | |
| hotspot | 是否具有设备热点 | boolean | |
| ip | IP地址 | string | |
| name | 设备名称 | string | |
| online | 在线状态 | integer(int32) |
PageMetadata
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| page | 页数 | integer(int64) | |
| size | 每页数量 | integer(int64) | |
| totalElements | 总数 | integer(int64) | |
| totalPages | 总页数 | integer(int64) |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | PagedDeviceInfo |
根据SN查询设备详细信息
接口描述: 根据设备SN获取对应设备的的详细信息
接口地址: https://yd.yunding360.com/openapi/devices/sn/{sn}
请求方式:GET
请求参数:
| 参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| sn | 设备SN | path | true | string |
响应示例:
{
"capabilityList": [],
"channel": [
{
"chnno": 0,
"hotspot": true,
"ip": "",
"name": "",
"online": 0
}
],
"deviceArea": "",
"display": true,
"enterpriseId": "",
"id": "",
"inOutDirection": "",
"key": "",
"lastOnlineTime": 0,
"loginKey": "",
"mediaSource": "",
"name": "",
"online": true,
"relayHost": "",
"relayPort": 0,
"sn": "",
"storeAreaId": "",
"storeId": ""
}
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| capabilityList | 门店能力,可用值: HOTSPOT_V2_AUDIO_VIDEO, FACE_FLOW, HOTSPOT_VIDEO, FLOW_VIDEO, STORAGE_CARD, HOTSPOT_V2, FACE, HOTSPOT, FLOW, CLOUD, AUDIO, VIDEO, COMMON | array | |
| channel | 设备通道信息,包含多个设备通道信息的数组,单通道设备该字段为null | array | 设备通道 |
| deviceArea | 门店区域(店内/店外),可用值: INDOOR, OUTDOOR, NOT_FLOW, PATROL, LICENSE_PLATE | string | |
| display | 是否可见,true表示可见,false表示不可见 | boolean | |
| enterpriseId | 企业id | string(uuid) | string(uuid) |
| id | Id | string(uuid) | string(uuid) |
| inOutDirection | 进出方向 | string | |
| key | 设备KEY | string | |
| lastOnlineTime | 设备最后在线时间 | integer(int64) | integer(int64) |
| loginKey | 设备登陆码 | string | |
| mediaSource | 媒体源地址 | string | |
| name | 设备名称 | string | |
| online | 是否在线,true表示在线,false表示离线 | boolean | |
| relayHost | 转发服务器地址 | string | |
| relayPort | 转发服务器端口 | integer(int32) | integer(int32) |
| sn | 设备序列号 | string | |
| storeAreaId | 店内区域(位置) | string | |
| storeId | 门店id | string(uuid) | string(uuid) |
schema属性说明
设备通道
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| chnno | 序号 | integer(int32) | |
| hotspot | 是否具有热点能力 | boolean | |
| ip | IP | string | |
| name | 名称 | string | |
| online | 在线状态 | integer(int32) |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | DeviceInfo |
获取单个设备的详细信息
接口描述: 根据设备id获取对应设备的详细信息
接口地址: https://yd.yunding360.com/openapi/devices/{uuid}
请求方式:GET
请求参数:
| 参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| uuid | 设备id | path | true | string |
响应示例:
{
"capabilityList": [],
"channel": [
{
"chnno": 0,
"hotspot": true,
"ip": "",
"name": "",
"online": 0
}
],
"deviceArea": "",
"display": true,
"enterpriseId": "",
"id": "",
"inOutDirection": "",
"key": "",
"lastOnlineTime": 0,
"loginKey": "",
"mediaSource": "",
"name": "",
"online": true,
"relayHost": "",
"relayPort": 0,
"sn": "",
"storeAreaId": "",
"storeId": ""
}
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| capabilityList | 门店能力,可用值: HOTSPOT_V2_AUDIO_VIDEO, FACE_FLOW, HOTSPOT_VIDEO, FLOW_VIDEO, STORAGE_CARD, HOTSPOT_V2, FACE, HOTSPOT, FLOW, CLOUD, AUDIO, VIDEO, COMMON | array | |
| channel | 设备通道信息,包含多个设备通道信息的数组,单通道设备该字段为null | array | 设备通道 |
| deviceArea | 门店区域(店内/店外),可用值: INDOOR, OUTDOOR, NOT_FLOW, PATROL, LICENSE_PLATE | string | |
| display | 是否可见,true表示可见,false表示不可见 | boolean | |
| enterpriseId | 企业id | string(uuid) | string(uuid) |
| id | Id | string(uuid) | string(uuid) |
| inOutDirection | 进出方向 | string | |
| key | 设备KEY | string | |
| lastOnlineTime | 设备最后在线时间 | integer(int64) | integer(int64) |
| loginKey | 设备登陆码 | string | |
| mediaSource | 媒体源地址 | string | |
| name | 设备名称 | string | |
| online | 是否在线,true表示在线,false表示离线 | boolean | |
| relayHost | 转发服务器地址 | string | |
| relayPort | 转发服务器端口 | integer(int32) | integer(int32) |
| sn | 设备序列号 | string | |
| storeAreaId | 店内区域(位置) | string | |
| storeId | 门店id | string(uuid) | string(uuid) |
schema属性说明
设备通道
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| chnno | 序号 | integer(int32) | |
| hotspot | 是否具有热点能力 | boolean | |
| ip | IP | string | |
| name | 名称 | string | |
| online | 在线状态 | integer(int32) |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | DeviceInfo |
分页获取设备离线日志
接口地址:https://yd.yunding360.com/openapi/devices/offline_log/page
请求方式:POST
请求数据类型:application/json
请求示例:
{
"storeId": "",
"storeCode": null,
"offlineType": null,
"endTime": 0,
"startTime": 0,
"storeStatus": ""
}
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
|---|---|---|---|---|
| api-version | API版本号,可用值:v1 | header | true | string |
| Authorization | Oauth2认证令牌 | header | false | string |
| page | 页数(从0开始) | query | false | integer |
| size | 每页数量 | query | false | integer |
| startTime | 告警时间-起(必填) | body | true | integer(int64) |
| endTime | 告警时间-止(必填) | body | true | integer(int64) |
| storeId | 门店id(非必填) | body | false | string |
| storeCode | 门店code(非必填) | body | false | string |
| offlineType | 离线类型(非必填),可选值: UNDETERMINED(待确定), ALL_DURING_BUSINESS(完全在营业时间范围内), ALL_OUTSIDE_BUSINESS(完全在营业时间范围外), MIXTURE(部分在营业时间范围内) |
body | false | string |
| storeStatus | 门店运行状态(非必填),可选值: IN_BUSINESS(运行中), CLOSING(关闭), SUSPEND(暂停) |
body | false | string |
| keyword | 设备名称,序列号关键字(非必填) | body | false | string |
响应状态:
| 状态码 | 说明 |
|---|---|
| 200 | OK |
响应参数:
| 参数名称 | 参数说明 | 类型 |
|---|---|---|
| id | ID | string(uuid) |
| storeId | 门店ID | string(uuid) |
| storeCode | 门店code | string |
| storeName | 门店名称 | string |
| deviceName | 设备名称 | string |
| sn | 设备SN | string |
| type | 设备型号 | string |
| channelName | 设备通道名称 | string |
| offlineTime | 离线时间 | integer(int64) |
| onlineTime | 上线时间 | integer(int64) |
| offlineType | 离线类型,可选值: UNDETERMINED(待确定), ALL_DURING_BUSINESS(完全在营业时间范围内), ALL_OUTSIDE_BUSINESS(完全在营业时间范围外), MIXTURE(部分在营业时间范围内) |
string |
| type | 设备型号 | string |
{
"content": [
{
"storeId": "bd8f79f0-a0ba-11eb-9de1-c1999079214b",
"deviceName": "3535云盯猫9217",
"sn": "DD35722C00009",
"type": "DX-1003H2N-PS-V3",
"deviceArea": "STORAGE",
"offlineTime": 1690925983808,
"onlineTime": 1690926614001,
"offlineType": "ALL_OUTSIDE_BUSINESS",
"duringBusinessTime": 0,
"deviceChannel": 14,
"channelName": "B2208_9143"
}
],
"metadata": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"page": 0
}
}