功能描述
该接口用于更新 HLS 播放密钥。
授权说明
请求
请求示例
PUT /playKey HTTP/1.1Host: <BucketName-APPID>.ci.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>Content-Length: <length>Content-Type: application/xml
请求头
请求参数
参数的具体内容如下:
节点名称(关键字) | 父节点 | 描述 | 类型 | 是否必选 |
masterPlayKey | 无 | 主播放密钥 长度限制:6~40字符 | String | 否(masterPlayKey 与 backupPlayKey 必须存在一个) |
backupPlayKey | 无 | 备播放密钥 长度限制:6~40字符 | String | 否 |
请求体
该请求的请求体为空。
响应
响应头
响应体
该响应体返回为 application/xml 数据,包含完整节点数据的内容展示如下:
<Response><RequestId></RequestId><PlayKeyList><MasterPlayKey></MasterPlayKey><BackupPlayKey></BackupPlayKey></PlayKeyList></Response>
具体的数据内容如下:
节点名称(关键字) | 父节点 | 描述 | 类型 |
Response | 无 | 保存结果的容器 | Container |
Container 节点 Response 的内容
:节点名称(关键字) | 父节点 | 描述 | 类型 |
RequestId | Response | 请求的唯一 ID | String |
PlayKeyList | Response | 保存播放密钥的容器 | Container |
Container 节点 PlayKeyList 的内容
:节点名称(关键字) | 父节点 | 描述 | 类型 |
MasterPlayKey | Response.PlayKeyList | 主播放密钥 | String |
BackupPlayKey | Response.PlayKeyList | 备播放密钥 | String |
错误码
实际案例
请求
PUT /playKey?masterPlayKey=abdcfeafdavdaa&backupPlayKey=fqefefdavdaedfdsfva HTTP/1.1Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=****************************************Host: test-1234567890.ci.ap-beijing.myqcloud.comContent-Length: 0Content-Type: application/xml
响应
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 100Connection: keep-aliveDate: Thu, 14 Jul 2022 12:37:29 GMTServer: tencent-cix-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****<Response><RequestId>NjQ0NGNlNDZfMThhYTk0MGFfY*********</RequestId><PlayKeyList><MasterPlayKey>abdcfeafdavdaa</MasterPlayKey><BackupPlayKey>fqefefdavdaedfdsfva</BackupPlayKey></PlayKeyList></Response>