修改下行域名配置
描述
修改指定直播空间中某个下行域名的配置
接口信息
- 请求方法:
PATCH - 请求地址:
<bucket>.mls.cn-east-1.qiniumiku.com - 请求路径:
/
请求参数
Query 参数
| 参数名称 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| domainConfig | string | 是 | domainConfig | 域名配置 |
| name | string | 是 | www.example.com | 域名 |
Header 参数
| 参数名称 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Host | string | 是 | <bucket>.mls.cn-east-1.qiniumiku.com |
请求的服务域名 |
| Authorization | string | 是 | <QiniuToken> |
管理凭证 QiniuToken,生成规则 |
Body 参数 (application/json)
示例:
{
"type":"liveRtmp",
"auth": {
"enable": true,
"type":"test",
"primaryKey": "QXV0aG9yaXphdGlvbg",
"secondaryKey": "QXV0aG9yaXphdGlvbg",
"expireSeconds": 120
},
"certificateID": "",
"httpsEnable": false
}
参数
| 参数名称 | 类型 | 是否必需 | 说明 |
|---|---|---|---|
| type | string | 可选 | 域名类型 |
| auth | object | 可选 | 防盗链配置信息,详见 auth 对象 |
| certificateID | string | 可选 | HTTPS 证书 ID,只支持 whip 协议域名 |
| httpsEnable | boolean | 可选 | 是否启用 HTTPS,只支持 whip 协议域名 |
请求示例
PATCH /?domainConfig&name=www.example.com HTTP/1.1
Host: test.mls.cn-east-1.qiniumiku.com
Authorization: <QiniuToken>
Content-Type: application/json
{
"type":"liveRtmp",
"auth": {
"enable": true,
"type":"test",
"primaryKey": "QXV0aG9yaXphdGlvbg",
"secondaryKey": "QXV0aG9yaXphdGlvbg",
"expireSeconds": 120
},
"certificateID": "",
"httpsEnable": false
}
返回响应
响应状态码
- 请查阅: 这里
响应示例
{
"enable": true,
"bucketId": "test",
"region": "cn-east-1",
"domain": "www.example.com",
"cname": "www.example.com.subscribe.mikudns.com",
"type": "liveRtmp",
"auth": {
"type": "test",
"enable": true,
"primaryKey": "QXV0aG9yaXphdGlvbg",
"secondaryKey": "QXV0aG9yaXphdGlvbg",
"expireSeconds": 120
},
"certificateID": "",
"creationDate": "2019-01-01T00:00:00.000+08:00",
"lastModified": "2019-01-02T00:00:00.000+08:00",
"httpsEnable": false,
"ipLimit": {
"whitelist": null,
"blacklist": null
},
"refererSecurity": {
"type": "",
"list": null,
"includeEmpty": false
}
}
响应参数
| 参数名称 | 类型 | 说明 |
|---|---|---|
| enable | boolean | 是否启用该配置 |
| bucketId | string | 存储空间 ID |
| region | string | 区域,暂时只支持 cn-east-1 |
| domain | string | 域名 |
| cname | string | CNAME 域名别名 |
| type | string | 域名类型(liveRtmp:rtmp 播放域名; liveHls:hls 播放域名; liveDash:dash 播放域名; liveFlv:flv 播放域名; whep:whep 播放域名; live:所有的播放协议共用一个域名; liveSrt:srt 播放域名) |
| auth | object | 防盗链配置,详见 auth 对象 |
| certificateID | string | HTTPS 证书 ID,只支持 whip 协议域名 |
| creationDate | string | 创建时间,遵循 ISO 8601 格式 |
| lastModified | string | 最后修改时间,遵循 ISO 8601 格式 |
| httpsEnable | boolean | 是否启用 HTTPS,只支持 whip 协议域名 |
| ipLimit | object | IP 限制配置,详见 ipLimit 对象 |
| refererSecurity | object | Referer安全配置,详见 refererSecurity 对象 |
auth 对象
| 参数名称 | 类型 | 说明 |
|---|---|---|
| type | string | 防盗链类型 |
| enable | boolean | 是否启用防盗链 |
| primaryKey | string | 主密钥 |
| secondaryKey | string | 从密钥 |
| expireSeconds | integer | 过期时间 s |
ipLimit 对象
| 参数名称 | 类型 | 说明 |
|---|---|---|
| whitelist | null | 白名单 |
| blacklist | null | 黑名单 |
refererSecurity 对象
| 参数名称 | 类型 | 说明 |
|---|---|---|
| type | string | “black”:黑名单类型 “white”:白名单类型 “”:关闭鉴权 |
| list | []string | Referer 白名单或黑名单列表(当前未启用,保留字段) |
| includeEmpty | boolean | 是否允许空 Referer 访问 |
文档反馈
(如有产品使用问题,请 提交工单)