调用 DescribeDomainConfig
查询点播域名配置,包含时间戳防盗链配置、URL 鉴权配置、HTTP 响应头配置。
请求地址:https://vod.volcengineapi.com?Action=DescribeDomainConfig&Version=2023-07-01
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共请求参数。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeDomainConfig | 接口名称。当前 API 的名称为 DescribeDomainConfig 。 |
Version | String | 是 | 2023-07-01 | 接口版本。当前 API 的版本为 2023-07-01 。 |
SpaceName | String | 是 | test-space | |
DomainType | String | 是 | play | 域名类型。取值如下:
说明 详见域名类型介绍。 |
Domain | String | 是 | example.volcengine.com | 域名。 |
下表仅列出本接口特有的返回参数。更多信息请见公共返回参数。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Config | Object | - | 域名配置详情。 |
ExpireControl | Object | - | 时间戳防盗链配置。更多信息,请见配置时间戳防盗链。 |
Expire | Integer | 3600 | 视频播放地址有效时长,单位为秒。 |
Status | String | enable | 时间戳防盗链配置状态,取值如下:
|
SignedUrlAuthControl | Object | - | URL 鉴权配置。更多信息,请见配置 URL 鉴权。 |
SignedUrlAuth | Object | - | URL 鉴权配置。 |
Switch | Boolean | true | URL 鉴权配置状态,取值如下:
|
SignedUrlAuthRules | Object[] | - | URL 鉴权规则。仅当 Switch 为 true 时有效。 |
Condition | Object | - | URL 鉴权规则生效对象。CDN 对符合条件的用户请求进行鉴权。 |
Connective | String | AND | 多个
|
ConditionRule | Object[] | - | 规则列表。最多支持 10 条规则。 |
Type | String | url | 生效对象类型。当前仅支持为 url ,表示 URL 请求链接。 |
Value | String | png;txt | 规则内容。不同规则类型的具体要求如下::
多个匹配值之间以分号(
|
Object | String | filetype | 规则类型。取值如下:
|
Operator | String | match | 匹配方式。取值如下:
|
SignedUrlAuthAction | Object | - | 签名计算配置。 |
Duration | Double | 3600 | 签名的有效时长,单位为秒。该参数与客户端请求中的时间戳参数搭配使用,用来计算签名的失效时间。签名的失效时间 = 时间戳 + 有效时长。CDN 收到某个请求时,如果签名的失效时间小于当前时间,CDN 判定签名已过期。 |
SignName | String | auth | 签名参数名称。该参数的说明如下:
URLAuthType 为 typea 、typed 、typee 时,该参数有效。对于其他类型,该参数不生效。 |
TimeName | String | timestamp | 时间戳参数名称。该参数的说明如下:
URLAuthType 为 typed 、typee 时,该参数有效。对于其他类型,该参数不生效。 |
TimeFormat | String | decimal | 时间格式。取值如下:
URLAuthType 为 typed 、typee 时,该参数为必填。当 URLAuthType 为 typec 时,无论您是否设置该参数,该参数的值会被强制设置为 heximal 。对于 URLAuthType 的其他值,该参数不生效。 |
RewriteM3u8 | Boolean | true | 是否开启 M3U8 改写。表示在响应
URLAuthType 为 typee 时,该参数无效。 |
URLAuthType | String | typea | 签名类型。取值如下:
|
SignatureRule | String[] | ["domain","ip","key","TimeName","uri"] | 需要纳入签名计算的字段。仅当 必须纳入签名计算的字段如下:
可选择纳入签名计算的字段如下:
MD5() 中各值顺序。 |
BackupSecretKey | String | abcdefg | 备密钥。长度限制为 6-40 个字符,可以包含除了 Delete(ASCII code 127)的可打印 ASCII 字符。 |
MasterSecretKey | String | abcdefg | 主密钥。长度限制为 6-40 个字符,可以包含除了 Delete(ASCII code 127)的可打印 ASCII 字符。 |
RewriteM3u8Rule | Object | - | M3U8 改写配置。仅当以下条件都满足时才有效:
|
DeleteParam | Boolean | true | 改写分片 URL 时是否保留 URL 中原有的参数。取值如下:
|
KeepM3u8Param | Boolean | true | 是否将来自该 M3U8 文件请求的不表示签名的查询参数添加到分片 URL 中。取值如下:
|
CustomVariableRules | Object | - | 自定义签算变量。 |
CustomVariableInstances | Object[] | - | 变量列表。 |
Type | String | queryString | 变量类型。取值如下:
|
Value | String | example | 变量名称。长度不超过 100 个字符。变量名称的要求如下:
|
Operator | String | match | 变量的匹配方式。当前仅支持 match 。 |
ResponseHeaderControl | Object | - | HTTP 响应头配置模块。更多信息,请见配置 HTTP 响应头。 |
ResponseHeader | Object[] | - | HTTP 响应头配置。 |
ResponseHeaderAction | Object | - | 点播 CDN 在响应用户请求的时候,对响应头的操作。 |
ResponseHeaderInstances | Object[] | - | 响应头的配置规则列表。每个规则都包含一个头部的操作配置。最多支持 50 条规则。 |
Key | String | Content-Disposition | 头部名称。名称不能超过 1,024 个字符,不区分大小写。可包含除以下字符外的可打印 ASCII 字符:下划线(_)、空格、双引号(")、Delete(ASCII code 127)。同时,不能使用这些特定的名称。 |
Value | String | attachment;filename=FileName.xls | 头部的值。仅当
|
Action | String | set | 对响应头的操作。取值如下:
|
ValueType | String | constant |
|
AccessOriginControl | Boolean | false | 在点播 CDN 响应用户请求时,是否校验请求头中的
注意 该参数仅在以下条件都满足的情况下有效:
|
Domain | Object | - | 域名基础信息。 |
Cname | String | example.test.volcengine.com.com | 视频点播服务为该加速域名分配的 CNAME。 |
Domain | String | example.volcengine.com | 加速域名。 |
CreateTime | String | 2024-06-26T11:04:58+08:00 | 配置创建时间。遵循 RFC3339 格式的东八区(UTC+8)时间,精度为秒。 |
LockStatus | String | off | 加速域名是否被锁定,取值如下:
|
ConfigStatus | String | enable | 加速域名的配置状态。取值如下:
|
SpaceName | String | test-space | 点播空间名称。 |
https://vod.volcengineapi.com?Action=DescribeDomainConfig&Version=2023-07-01&SpaceName=test-space&DomainType=play&Domain=example.volcengine.com
{ "ResponseMetadata": { "RequestId": "20250211164302701889A54B2A490209D4", "Action": "DescribeDomainConfig", "Version": "2023-07-01", "Service": "vod", "Region": "cn-north-1" }, "Result": { "SpaceName": "example", "Domain": { "Domain": "example.volcengine.com", "Cname": "example.volcengine.com.bytevdn.com", "ConfigStatus": "online", "CreateTime": "2025-02-11T16:40:46+08:00", "LockStatus": "off" }, "Config": { "ResponseHeaderControl": { "ResponseHeader": [ { "ResponseHeaderAction": { "ResponseHeaderInstances": [ { "Action": "set", "Key": "Access-Control-Allow-Origin", "ValueType": "constant", "AccessOriginControl": false, "Value": "*" } ] } } ] }, "ExpireControl": { "Expire": 3600, "Status": "enable" }, "SignedUrlAuthControl": { "SignedUrlAuth": { "Switch": true, "SignedUrlAuthRules": [ { "Condition": { "Connective": "OR", "ConditionRule": [ { "Type": "url", "Object": "directory", "Operator": "match", "Value": "/" } ] }, "SignedUrlAuthAction": { "URLAuthType": "typea", "MasterSecretKey": "103988030d634***bf8548322a33692d", "BackupSecretKey": "103988030d634***bf8548322a33692d", "SignName": "auth_key", "TimeName": "", "Duration": 0, "TimeFormat": "", "RewriteM3u8": true, "SignatureRule": [], "RewriteM3u8Rule": { "DeleteParam": false, "KeepM3u8Param": false } } } ] } } } } }
下表列举了本接口特有的错误码。如需了解更多错误码,详见视频点播公共错误码。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | InvalidParameter.InvalidDomainType | Domain type must be play/image | DomainType 取值不合法 |
400 | InvalidParameter.DomainNotFound | The domain does not exist | 域名不存在 |