1. 通道管理
GoWVP
  • 鉴权说明
  • 控制台
    • 服务器状态
      GET
  • 推流列表
    • 添加推流通道
      POST
    • 删除推流通道
      DELETE
    • 编辑推流通道
      PUT
    • 查询推流通道列表
      GET
  • 拉流代理
    • 添加拉流代理
      POST
    • 添加拉流代理
      DELETE
    • 编辑拉流代理
      PUT
    • 查询拉流代理列表
      GET
  • 国标设备
    • 通道
      • 播放
      • 通道列表
      • 修改通道
      • 图像抓拍
      • 获取图像
      • 添加区域
      • 获取区域
    • 添加设备
      POST
    • 设备列表
      GET
    • 删除设备
      DELETE
    • 修改设备
      PUT
    • 设备详情
      GET
    • 设备与通道列表
      GET
    • 查询设备目录
      POST
  • 配置管理
    • 查询配置信息
      GET
    • 修改 sip 配置
      PUT
    • 查询流媒体列表
      GET
    • 修改流媒体配置
      PUT
  • ONVIF
    • 设备发现
    • 添加设备
    • ONVIF 设备发现
  • GB28181
    • GB28181 快照回调
  • 通道管理
    • 添加通道
      POST
    • 删除通道
      DELETE
    • 启用 AI 检测
      POST
    • 禁用 AI 检测
      POST
  • events
    • 分页查询事件列表
    • 获取单个事件详情
    • 更新事件信息
    • 删除事件
    • 获取事件快照图片
  1. 通道管理

添加通道

POST
/channels
添加 RTMP/RTSP 通道
设备关联逻辑:
1.
如果提供 device_id,则关联到已存在的设备
2.
如果提供 device_name(无 device_id),则创建新的虚拟设备
3.
两者都不提供则返回错误
示例1 - 添加 RTMP 推流通道(关联已有设备):
{
  "type": "RTMP",
  "name": "推流通道1",
  "device_id": "mp123456",
  "app": "live",
  "stream": "stream1",
  "config": {
    "is_auth_disabled": false
  }
}
示例2 - 添加 RTSP 拉流通道(创建新设备):
{
  "type": "RTSP",
  "name": "拉流通道1",
  "device_name": "新设备",
  "app": "live",
  "stream": "stream2",
  "config": {
    "source_url": "rtsp://192.168.1.100:554/stream",
    "transport": 0,
    "enabled": true
  }
}

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/json必填

示例
{
    "type": "RTMP",
    "name": "string",
    "device_id": "string",
    "device_name": "string",
    "app": "string",
    "stream": "string",
    "config": {
        "is_auth_disabled": true,
        "pushed_at": 0,
        "stopped_at": 0,
        "media_server_id": "string",
        "push_addr": "string",
        "source_url": "string",
        "transport": 0,
        "timeout_s": 0,
        "enabled_audio": true,
        "enabled_remove_none_reader": true,
        "enabled_disabled_none_reader": true,
        "stream_key": "string",
        "enabled": true
    }
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'http://test-cn.your-api-server.com/channels' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "type": "RTMP",
    "name": "string",
    "device_id": "string",
    "device_name": "string",
    "app": "string",
    "stream": "string",
    "config": {
        "is_auth_disabled": true,
        "pushed_at": 0,
        "stopped_at": 0,
        "media_server_id": "string",
        "push_addr": "string",
        "source_url": "string",
        "transport": 0,
        "timeout_s": 0,
        "enabled_audio": true,
        "enabled_remove_none_reader": true,
        "enabled_disabled_none_reader": true,
        "stream_key": "string",
        "enabled": true
    }
}'

返回响应

🟢200成功
application/json
成功
Bodyapplication/json

示例
{
    "id": "string",
    "did": "string",
    "device_id": "string",
    "channel_id": "string",
    "name": "string",
    "ptztype": 0,
    "is_online": true,
    "is_playing": true,
    "type": "string",
    "app": "string",
    "stream": "string",
    "config": {
        "is_auth_disabled": true,
        "pushed_at": 0,
        "stopped_at": 0,
        "media_server_id": "string",
        "push_addr": "string",
        "source_url": "string",
        "transport": 0,
        "timeout_s": 0,
        "enabled_audio": true,
        "enabled_remove_none_reader": true,
        "enabled_disabled_none_reader": true,
        "stream_key": "string",
        "enabled": true
    },
    "created_at": 0,
    "updated_at": 0,
    "ext": {
        "manufacturer": "string",
        "model": "string",
        "firmware": "string",
        "name": "string",
        "gb_version": "string",
        "zones": [
            {
                "name": "string",
                "coordinates": [
                    0
                ],
                "color": "string",
                "labels": [
                    "string"
                ]
            }
        ],
        "enabled_ai": true
    }
}
修改于 2026-01-13 15:30:00
上一页
GB28181 快照回调
下一页
删除通道
Built with