查询设备
更新时间:2022-09-26
接口描述
本接口用于查询EVS设备。
请求(Request)
请求URI
GET /v1/device/{deviceId}
参数名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
deviceId | Long | 是 | 设备ID |
请求头域
除公共头域外,无其它特殊头域。
请求体
无
响应(Response)
响应头域
除公共头域外,无其它特殊头域。
响应体
公共参数见「创建设备」的请求体参数信息。
需要注意:
参数名称 | 类型 | 描述 |
---|---|---|
status | String | 设备当前状态,区分设备类型,RTMP设备状态包含:ONLINE(在线)/RUNNING(推流中)/OFFLINE(已封禁设备),GB28181设备状态包含:UNREGISTERED(未注册)/ONLINE(注册后)/OFFLINE(注销后),ONVIF设备状态包含:ONLINE(在线)/OFFLINE(离线)/DEAD(异常),RTSP设备状态包含:ONLINE(在线)/RUNNING(拉流中)/OFFLINE(离线)/DEAD(异常)/DISABLE(禁止拉流) |
edge | Object | 节点信息 |
domains | Array | 域名信息 |
channelCount | Integer | 通道个数 |
snCode | String | bvcp设备sn码 |
deviceMode | String | bvcp设备型号 |
请求示例
GET /v1/device/1000001 HTTP/1.1
x-bce-date: 2020-03-25T09:28:13Z
host: evs.bj.baidubce.com
content-type: application/json
authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2020-03-25T09:28:13Z/1800/content-type;host;x-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应示例
HTTP/1.1 200 OK
Transfer-Encoding: chunked
x-bce-request-id: 012b9747-f13a-4a2c-a488-02b221844dca
Cache-Control: no-cache
Server: BWS
Date: Tue, 24 Mar 202 013:34:07 GMT
Content-Type: application/json;charset=UTF-8
{
"deviceId": 1,
"deviceName": "evs_device_name",
"deviceStreamId": "appId/streamId",
"type": "RTMP",
"status": "RUNNING",
"description": "evs_device_description",
"upstreamAuth": {
"sameAsSpace": false
"enable": true,
"key": "evs_upstream_key",
"expire": 3600
},
"downstreamAuth": {
"sameAsSpace": false
"enabled": true,
"key": "evs_downstream_key",
"expire": 3600
},
"domains": [
{
"domain": "evs.up.baidu.com",
"type": "UPSTREAM",
"cname": "",
},
{
"domain": "evs.down.baidu.com",
"type": "DOWNSTREAM",
"cname": ""
}
],
"transcodeForwardConfig": {
"enabled": true,
"transcodeTemplateId": 1,
"forwardDomain": "test.test",
"transcodeTemplateName": "preset_template_h264"
},
"watermarkConfig": {
"extendsSpace": true,
"watermarkTemplates": [
{
"extendsSpace": true,
"watermarkTemplateId": 1
}
]
},
"recording": {
"enabled": true,
"bucket": "evs_bucket",
"duration": 600,
"format": "M3U8",
"authEnabled": true,
"authExpire": 3600
},
"thumbnail": {
"enabled": true,
"bucket": "evs_bucket",
"interval": 10,
"authEnabled": true,
"authExpire": 3600
},
"edge": {
"edgeId": 1,
"edgeName": "北京_北京_双线_1"
},
"spaceId": 1000006,
"spaceName": "evs_space_name",
"channelCount": 5,
"createTime": "2020-03-04 00:00:00"
}
错误码
参考公共错误码