You need to enable JavaScript to run this app.
视频直播

视频直播

复制全文
流管理
DescribeLiveStreamGroupByPage - 查询在线流信息
复制全文
DescribeLiveStreamGroupByPage - 查询在线流信息

调用 DescribeLiveStreamGroupByPage 接口,查询在线流的 ID、名称、类型等信息。

使用说明

该接口支持查询以下层级的在线流信息:

  • Vhost/Domain
  • Vhost/Domain+ App
  • Vhost/Domain + App + Stream

当存在多个层级的配置时,接口返回的在线流信息以优先级最高的配置为准,优先级由低到高依次为:Vhost/Domain < Vhost/Domain+ App < Vhost/Domain + App + Stream。例如,当同时传入 VhostDomainAppStream 时,接口返回的是 Vhost + App + Stream 级别的在线流信息。

注意

  • 如果同时传入 VhostDomain,则仅 Vhost 生效。
  • 如果 Vhost 和 Domain 均未传入,则查询所有域名空间下的在线流。

注意事项

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

请求说明

  • 请求方式:POST
  • 请求地址:https://live.volcengineapi.com?Action=DescribeLiveStreamGroupByPage&Version=2023-01-01

调试

请求参数

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

Query

参数类型是否必选示例值描述
ActionStringDescribeLiveStreamGroupByPage接口名称。当前 API 的名称为 DescribeLiveStreamGroupByPage
VersionString2023-01-01接口版本。当前 API 的版本为 2023-01-01

Body

参数类型是否必选示例值描述
PageNumInteger1查询数据的页码,取值必须大于等于 1
PageSizeInteger10每页显示的数据条数,取值范围为 [1,1000]。

Vhost

String

push.example.com

域名空间,即直播流使用的域名所属的域名空间。默认为空,表示查询所有域名空间下的在线流。您可以调用 ListDomainDetail 接口或在视频直播控制台的域名管理页面,查看需要查询的直播流使用的域名所属的域名空间。

说明

  • 如果同时传入 Vhost 和 Domain,则 Vhost 优先级更高。
  • 如果 Vhost 和 Domain 均未传入,则查询所有域名空间下的在线流。

Domain

String

push.example.com

直播流使用的域名,表示查询所有当前域名所属域名空间的在线流。您可以调用 ListDomainDetail 接口或在视频直播控制台的域名管理页面,查看直播流使用的域名。

说明

  • 如果同时传入 Vhost 和 Domain,则 Vhost 优先级更高。
  • 如果 Vhost 和 Domain 均未传入,则查询所有域名空间下的在线流。

App

String

live

应用名称,取值与直播流地址中 AppName 字段取值相同。默认为空,表示查询所有应用名称。长度为 1 到 30 个字符,支持以下字符:

  • 大写字母 A - Z
  • 小写字母 a - z
  • 数字(0 - 9)
  • 下划线(_)
  • 短横线(-)
  • 句点(.)

Stream

String

example_stream

流名称,取值与直播流地址中 StreamName 字段取值相同。长度为 1 到 100 个字符。支持以下字符:

  • 大写字母 A - Z
  • 小写字母 a - z
  • 数字(0 - 9)
  • 下划线(_)
  • 短横线(-)
  • 句点(.)

说明

  • 如果同时传入 StreamStreamList,则 Stream 优先级更高。
  • 如果 Stream 和 StreamList 均未传入,则查询所有流名称。

StreamList

Array of String

["example_stream1","example_stream2"]

流名称列表,最多可传入 50 个流名称。

说明

  • 如果同时传入 StreamStreamList,则 Stream 优先级更高。
  • 如果 Stream 和 StreamList 均未传入,则查询所有流名称。

QueryType

String

strict

使用流名称进行查询的方式。默认值为 strict。取值如下:

  • fuzzy:模糊匹配,英文区分大小写。
  • strict:精准匹配。

说明

如果 StreamList 生效且包含 2 个及以上的流名称,则仅支持取值 strict

StreamType

String

origin

在线流的流类型。默认为空,表示查询所有类型。取值如下:

  • origin:原始流。
  • trans:转码流。

SourceType

String

push

在线流的来源类型。默认为空,表示查询所有来源类型。取值如下:

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

QueryPriority

Integer

0

是否查询多备份流(备流)。默认为空,表示查询所有流。取值如下:

  • 0:不查询。
  • 1:查询。

返回参数

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

参数类型示例值描述
StreamInfoListArray of StreamInfoList-在线流信息列表。
RoughCountInteger1查询结果中在线流的数量。

StreamInfoList

参数类型示例值描述
IDLong1005002在线流的 ID。
VhostStringpush.example.com在线流使用的域名所属的域名空间。
DomainStringpush.example.com在线流使用的域名。
AppStringlive在线流使用的应用名称。
StreamStringexample_stream在线流使用的流名称。
SessionStartTimeString2021-10-29T00:55:50.186Z在线流开始推流的时间。遵循 RFC3339 格式的 UTC 时间,精度为毫秒。
StreamInfoDetailsArray of StreamInfoDetails-在线流的主流和备流详情。

IsRelay

Boolean

false

是否为回源流。取值如下:

  • true:是。
  • false:否,即直播推流。

StreamType

String

origin

流类型。取值如下:

  • origin:原始流。
  • trans:转码流。

StreamInfoDetails

参数类型示例值描述
SessionStartTimeString2021-10-29T00:55:50.186Z在线流开始推流的时间。遵循 RFC3339 格式的 UTC 时间,精度为毫秒。
PriorityString1流的优先级。数值越大,优先级越高。优先级最高的流为主流,其余流根据优先级决定备流切换顺序。

IsBackUp

Boolean

false

是否为备流。取值如下:

  • true:备流。
  • false:主流。
IDLong1005002在线流的 ID。

IsForcePriority

Boolean

false

是否强制优先。取值如下:

  • true:强制优先,即无视优先级,强制设置为主流。
  • false:不强制优先。

请求示例

POST https://live.volcengineapi.com?Action=DescribeLiveStreamGroupByPage&Version=2023-01-01
{
    "Domain": "push.example.com",
    "Vhost": "push.example.com",
    "App": "live",
    "Stream": "example_stream",
    "StreamType": "origin",
    "SourceType": "push",
    "QueryPriority": 0,
    "QueryType": "strict",
    "StreamList": [
        "example_stream1",
        "example_stream2"
    ],
    "PageNum": 1,
    "PageSize": 10
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20230604110420****100232280022D31",
        "Action": "DescribeLiveStreamGroupByPage",
        "Version": "2023-01-01",
        "Service": "live",
        "Region": "cn-north-1"
    },
    "Result": {
        "StreamInfoList": [
            {
                "ID": 1005002,
                "Vhost": "push.example.com",
                "Domain": "push.example.com",
                "App": "live",
                "Stream": "example_stream",
                "StreamInfoDetails": [
                    {
                        "SessionStartTime": "2021-10-29T00:55:50.186Z",
                        "Priority": "1",
                        "IsBackUp": false,
                        "ID": 1005002,
                        "IsForcePriority": false
                    }
                ],
                "SessionStartTime": "2021-10-29T00:55:50.186Z",
                "IsRelay": false,
                "StreamType": "origin"
            }
        ],
        "RoughCount": 1
    }
}

错误码

下表仅列出本接口特有的错误码。更多信息请参见公共错误码获取详细信息。

状态码错误码错误信息说明
200CommonErr-未分类错误。建议重试,如果仍返回该错误码,请联系技术支持
400InvalidParam-输入的参数无效或不符合要求,请参照请求参数说明进行检查。
400InvalidParam.BindErrorRequest parameter error, please check input data参数未通过校验,请检查参数类型是否正确。
400InvalidParam.OutOfRange%s should be one of {[%s]}%s should be between %d and %d参数超出允许范围,请检查错误消息中指定参数的取值是否超出取值范围。
403RequestForbidden-请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)。
403RequestForbidden.AccountIDNotAllowthis AccountID does not have permission to access the corresponding resource, please check the request parameters请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)。
403RequestForbidden.BillingStatusBilling status is not available for the AccountID, please activate the service or recharge.未开通视频直播服务或账号欠费,造成账单不可用,请检查服务开通情况和账号欠费情况。
403AccessDeniedUser is not authorized to perform: %s on resource: %s请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)或者接口权限。
404ResourceNotFound-未找到资源(域名空间、域名、应用、配置模版、证书)。建议重试,如果仍返回该错误码,请联系技术支持
404ResourceNotFound.VhostNotExistvhost not found未找到域名空间(Vhost)。请检查传入的域名空间是否与实际使用的域名空间一致。
500InternalErroran internal error occurred, please contact the administrator.出现内部错误,请联系技术支持
500InternalError.DBan internal error related to database occurred, please contact the administrator.出现与数据库相关的内部错误,请联系技术支持
500InternalError.VhostOrDomainan internal error related to vhost or domain occurred, please contact the administrator.出现与域名空间(Vhost)或域名(Domain)相关的内部错误。请联系技术支持
502InternalServiceErroran internal error occurred, please contact the administrator.服务间出现错误,请联系技术支持
502InternalServiceError.BadResponsean internal error occurred, please contact the administrator.服务间出现错误,请联系技术支持
504InternalServiceTimeoutInternal Service is timeout. please contact the administrator.内部服务超时,请联系技术支持

服务端 SDK

视频直播提供了配套的开发工具集 SDK,支持多种编程语言,帮助您更方便的调用 API。

最近更新时间:2026.01.19 11:44:11
这个页面对您有帮助吗?
有用
有用
无用
无用