设备管理

GET 查询设备列表

/api/v1/device/list

分页查询接入的国标设备列表。

请求参数

参数名 类型 必填 描述
start int 起始索引,默认0
limit int 每页数量,默认10
q string 搜索关键字
online string 在线状态过滤 (true/false)

响应示例

{
    "DeviceCount": 10,
    "DeviceList": [
        {
            "ID": "34020000001320000001",
            "Name": "IPC",
            "Online": true,
            "Manufacturer": "Hikvision",
            "LastKeepaliveAt": "2023-10-27 10:00:00"
        }
    ]
}

POST 删除设备

/api/v1/device/remove

删除指定的设备。

请求参数

参数名 类型 必填 描述
serial string 设备国标ID

通道管理

GET 查询通道列表

/api/v1/device/channellist

查询指定设备下的通道列表。

请求参数

参数名 类型 必填 描述
serial string 设备国标ID
start int 起始索引
limit int 每页数量

推流/预览控制

GET 开始预览

/api/v1/stream/start

向设备发送Invite信令,开始实时预览。

请求参数

参数名 类型 必填 描述
serial string 设备国标ID
code string 通道国标ID

GET 停止预览

/api/v1/stream/stop

停止实时预览。

请求参数

参数名 类型 必填 描述
serial string 设备国标ID
code string 通道国标ID

回放控制

GET 查询录像列表

/api/v1/playback/recordlist

查询设备端的历史录像文件。

请求参数

参数名 类型 必填 描述
serial string 设备国标ID
code string 通道国标ID
starttime string 开始时间 (yyyy-MM-dd HH:mm:ss)
endtime string 结束时间 (yyyy-MM-dd HH:mm:ss)

JT1078 管理

POST 添加虚拟设备

/api/v1/jt/device/add

创建一个虚拟的GB28181设备,用于映射JT1078设备。

请求参数 (JSON)

{
    "username": "34020000001400000001", // 国标ID
    "server_id": "34020000002000000001", // SIP服务器ID
    "server_addr": "192.168.1.100:5060", // SIP服务器地址
    "transport": "udp",
    "password": "password",
    "name": "虚拟设备",
    "sim_number": "13800138000" // 关联的SIM卡号
}