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

查询 Referer 黑白名单

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

首次发布时间2021.11.10 14:58:09

查询 Referer 防盗链内容。

说明

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

注意事项

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

请求说明

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

请求参数

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

Query

参数类型是否必选示例值描述
ActionStringDescribeReferer接口名称。当前 API 的名称为 DescribeReferer
VersionString2020-08-01接口版本。当前 API 的版本为 2020-08-01

Body

参数类型是否必选示例值描述

Vhost

String

live.push.example.com

域名空间名称

说明

参数 DomainVhost 传且仅传一个。

Domain

String

live.push.example.com

拉流域名

说明

  • 参数 DomainVhost 传且仅传一个。
  • 参数 DomainApp 至少传一个。

App

String

live

应用名称,默认为所有应用名称,由 1 到 30 位数字、字母、下划线及"-"和"."组成

说明

参数 DomainApp 至少传一个。

返回参数

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

参数类型示例值描述
RefererListArray of RefererList-Referer 防盗链信息列表

RefererList

参数类型示例值描述
VhostStringlive.push.example.com域名空间名称
DomainStringlive.push.example.com拉流域名
AppStringlive应用名称,由 1 到 30 位数字、字母、下划线及"-"和"."组成。
RefererInfoListArray of RefererInfoList-Referer 防盗链详情列表

RefererInfoList

参数类型示例值描述
KeyStringreferer用于标识 referer 防盗链的关键词,返回值为 referer

Type

String

deny

防盗链类型。

  • deny:黑名单;
  • allow:白名单。
ValueStringexample1.com防盗链规则
PriorityInteger11优先级,当前默认返回值为 0。当多域名返回值一致时,按照域名输入顺序区分,越早加入列表的域名优先级越高

示例

请求示例

POST https://live.volcengineapi.com?Action=DescribeReferer&Version=2020-08-01
{
  "Vhost": "live.push.example.com",
  "App": "live"
}

返回示例

{
  "ResponseMetadata": {
    "RequestID": "202103032052250102251070931601EBBB",
    "Action": "DescribeReferer",
    "Version": "2020-08-01",
    "Service": "live",
    "Region": "cn-north-1"
  },
  "Result": {
    "RefererList": [
      {
        "Vhost": "live.push.example.com",
        "App": "live",
        "RefererInfoList": [
          {
            "Type": "deny",
            "Key": "referer",
            "Value": "example1.com",
            "Priority": 11
          }
        ]
      },
      {
        "Vhost": "live.push.example2.com",
        "App": "live2",
        "RefererInfoList": [
          {
            "Type": "deny",
            "Key": "referer",
            "Value": "example2.com",
            "Priority": 100
          },
          {
            "Type": "allow",
            "Key": "referer",
            "Value": "example3.com",
            "Priority": 90
          }
        ]
      }
    ]
  }
}

错误码

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