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

查询 HTTP Header 配置

最近更新时间2024.04.07 19:16:33

首次发布时间2024.04.07 19:16:33

调用 DescribeHTTPHeaderConfig 接口,查询拉流域名的 HTTP Header 配置。

注意事项

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

请求说明

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

调试

请求参数

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

Query

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

Body

参数类型是否必选示例值描述
VhostStringpush.example.com域名空间,即直播流地址的域名所属的域名空间。您可以调用 ListDomainDetail 接口或在视频直播控制台的域名管理页面,查看需要域名所属的域名空间。
DomainStringpull.example.com拉流域名。默认为空,表示查询 Vhost 下的全部拉流域名的 HTTP Header 配置。您可以调用 ListDomainDetail 接口或在视频直播控制台的域名管理页面,查看待查询的拉流域名。

Phase

Integer

0

HTTP Header 的类型,支持的取值及含义如下所示。

  • 0:请求响应头;
  • 1:回源请求头。

返回参数

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

参数类型示例值描述
HeaderConfigListArray of HeaderConfigList-HTTP Header 配置信息。

HeaderConfigList

参数类型示例值描述
VhostStringpush.example.com域名空间。
DomainStringpull.example.com拉流域名。
HeaderDetailListArray of HeaderDetailList-域名的 HTTP Header 具体字段配置。

BlockOriginal

Integer

0

是否保留原 Header 配置,取值及含义如下所示。

  • 0:保留;
  • 1:不保留。

Enable

Boolean

true

配置是否启用,取值及含义如下所示。

  • true:启用;
  • false:禁用。

HeaderDetailList

参数类型示例值描述
HeaderKeyStringContent-TypeHeader 配置中字段的 Key 值。
HeaderValueStringtext/plainHeader 配置中字段的 Value 值。

HeaderFieldType

Integer

0

Header 配置中字段 Value 值的类型,取值及含义如下所示。

  • 0:常量;
  • 1:变量。

请求示例

POST https://live.volcengineapi.com?Action=DescribeHTTPHeaderConfig&Version=2023-01-01
{
    "Vhost": "push.example.com",
    "Domain": "pull.example.com",
    "Phase": 0
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202306041104200100100232280022D31",
        "Action": "DescribeHTTPHeaderConfig",
        "Version": "2023-01-01",
        "Service": "live",
        "Region": "cn-north-1"
    },
    "Result": {
        "HeaderConfigList": [
            {
                "Vhost": "push.example.com",
                "Domain": "pull.example.com",
                "BlockOriginal": 0,
                "Enable": true,
                "HeaderDetailList": [
                    {
                        "HeaderKey": "Content-Type",
                        "HeaderValue": "text/plain",
                        "HeaderFieldType": 0
                    }
                ]
            }
        ]
    }
}

错误码

您可访问公共错误码,获取更多错误码信息。

状态码错误码错误信息说明
200CommonErr-未分类错误。建议重试,如果仍返回该错误码,请联系技术支持
400InvalidParam-输入的参数无效或不符合要求,请参照请求参数说明进行检查。
400InvalidParam.BindErrorRequest parameter error, please check input data参数未通过校验,请检查参数类型是否正确。
400InvalidParam.DomainAndAppdomain and app exist can not exist at the same time入参不能同时传入 Domain 和 App ,请修改入参。
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.未开通视频直播服务或账号欠费,造成账单不可用,请检查服务开通情况和账号欠费情况。
404ResourceNotFound-未找到资源(域名空间、域名、应用、配置模版、证书)。建议重试,如果仍返回该错误码,请联系技术支持
404ResourceNotFound.DomainNotExistdomain not found未找到域名(Domain)。请检查传入的域名是否与实际使用的域名一致。
500InternalErroran internal error occurred, please contact the administrator.出现内部错误,请联系技术支持
500InternalError.DBan internal error related to database occurred, please contact the administrator.出现与数据库相关的内部错误,请联系技术支持
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.内部服务超时,请联系技术支持