You need to enable JavaScript to run this app.
导航

查询在线流列表

最近更新时间2023.10.12 17:39:56

首次发布时间2021.11.10 15:01:04

调用接口分页查询在线流列表信息。

说明

该接口属于历史版本 API,我们计划于 2023 年 12 月 25 日停止对其进行维护,并于 2024 年 3 月 25 日下线文档,建议您使用新版查询在线流地址接口。

注意事项

请求频率:单用户请求频率限制为 10 次/秒

请求说明

  • 请求方式:GET
  • 请求地址:https://live.volcengineapi.com?Action=DescribeLiveStreamInfoByPage&Version=2020-08-01

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

Query

参数类型是否必选示例值描述
ActionStringDescribeLiveStreamInfoByPage接口名称。当前 API 的名称为 DescribeLiveStreamInfoByPage
VersionString2020-08-01接口版本。当前 API 的版本为 2020-08-01
PageNumInteger1当前页码,取值范围 ≥1
PageSizeInteger10分页大小,取值范围为 [1,1000]

Vhost

String

live.example.net

域名空间名称。

说明

  • 如果同时传入 Domain 和对应的 Vhost,会返回 Domain 下的在线流列表;
  • 如果 DomainVhost 同时缺省,会返回当前 AccountID 下的在线流列表。

Domain

String

live.example.net

推流域名(含删除域名)。

说明

  • 如果同时传入 Domain 和对应的 Vhost,会返回 Domain 下的在线流列表;
  • 如果 DomainVhost 同时缺省,会返回当前 AccountID 下的在线流列表。
AppStringlive应用名称,默认查询所有应用名称,由 1 到 30 位数字、字母、下划线及"-"和"."组成
StreamStringsumasTest流名称,缺省情况下,查询所有流名称,由 1 到 100 位数字、字母、下划线及"-"和"."组成,如果指定 Stream,必须同时指定 App 的值

StreamType

String

Origin

流类型,缺省情况下表示全选。支持如下取值。

  • Origin:原始流;
  • trans:转码流。

SourceType

String

push

表示推流方式,缺省情况查询全部推流方式。支持如下取值。

  • push:直推流;
  • relay:回源流。

返回参数

下表仅列出本接口特有的返回参数。更多信息请见返回结构

参数类型示例值描述
StreamInfoListArray of StreamInfoList-流信息列表
RoughCountInteger1当前分页的在线流数量

StreamInfoList

参数类型示例值描述
IDInteger1005002流 ID
VhostStringlive.example.net域名空间名称
DomainStringlive.example.net域名
AppStringlive应用名称
StreamStringstream1流名称
SessionStartTimeString2021-10-29T08:55:50.186+08:00开始推流时间

SourceType

String

push

表示推流方式,缺省情况查询全部推流方式。支持如下取值。

  • push:直推流;
  • relay:回源流。

示例

请求示例

GET https://live.volcengineapi.com?Action=DescribeLiveStreamInfoByPage&Version=2020-08-01&App=live&Domain=live.example.net&PageNum=1&PageSize=10&SourceType=push&Stream=sumasTest&StreamType=Origin&Vhost=live.example.net

返回示例

{
  "ResponseMetadata": {
    "RequestId": "202110291811420102250842170013F8D2",
    "Action": "DescribeLiveStreamInfoByPage",
    "Version": "2020-08-01",
    "Service": "live",
    "Region": "cn-north-1"
  },
  "Result": {
    "RoughCount": 1,
    "StreamInfoList": [
      {
        "App": "live",
        "Domain": "live.example.net",
        "ID": 1005002,
        "SessionStartTime": "2021-10-29T08:55:50.186+08:00",
        "Stream": "stream1",
        "SourceType": "push",
        "Vhost": "live.example.net"
      }
    ]
  }
}

错误码

访问公共错误码获取详细信息。