直播分发
通过接口自助查询流媒体时间戳防盗链配置。接口url的*可为域名名称或域名id。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domain | String | 是 | 需要查询配置的域名(domainName)或域名id(domainId) |
参数名称 | 类型 | 描述 |
---|---|---|
code | String | 错误代码,当HTTPStatus不为200时出现,表示当前请求调用的错误类型 |
message | String | 响应信息,成功时为success |
data | QueryLivestreamingTimestampAntihotlinkingConfigResponseData | 响应数据 |
domainId | String | |
domainName | String | |
timestampVisitControlRules | List | 流媒体防盗链配置,父标签
1.需要设置流媒体防盗链配置时,此项必填
2.为 |
cipherParam | String | 密文参数名称,未入参则默认值为wsSecret |
timeParam | String | 时间参数名称,未入参则默认值为wsTime |
secretKey | String | 密钥 |
timeFormat | String | 加密时间格式,必填,可选值为【UNIX timestamp】和【hex】,分别为【UNIX时间戳】、【16进制】。 |
effectiveTimeMode | String | 有效时间计算方式,可选值:duration、abstime、no verification 1、duration,表示按时长。设置为“按时长”,则effectiveTime必填。 2、abstime,表示按绝对时间。支持某个url到某个未来时间有效(最大支持3652天) 3、no verification,表示不校验时间。则自动清空effectiveTime。 |
effectiveTime | Integer | 有效时长,单位秒(s),正整数,值要>=1。 |
tolerantTime | Integer | 容忍值,误差时间,单位秒(s),正整数,值要>=1 |
cipheCombination | String | 密文组合方式,可选值为以下六项: key+path+time key+time+path path+key+time path+time+key time+path+key time+key+path |
dataId | Integer | 配置多组配置时,具体某组配置的id。dataId可以通过查询接口获取。 注意: a、如果有传dataId,说明指定修改其中一组配置项内容,不需求修改其他组配置内容不需要入参; b、如果入参多组配置,其中有些组配置有传dataId,有些没有传,则有传dataId的表示修改具体某组配置,没有传dataId的表示在原来基础上新增一组配置; c、如果入参都没有传dataId,表示用本次的配置全量覆盖原先配置; d、如果入参没有传任何配置项参数,只传了域名和二级标签,表示清空这个接口对应域名二级服务所有配置; e、如果一组配置没有具体的配置项,则dataId必填,且值为实际存在的dataId,表示清空这个dataId对应配置项的值;不允许一组配置没有具体的配置项也没有dataId。 |
x-cnc-request-id | String | 唯一标示的id,用于查询每次请求的任务 (适用全部接口) |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
26939999 | We encountered an internal error. Please try again. | 500 | 系统内部错误,请联系技术支持。 |
0 | success | 200 | 请求成功 |
26932001 | The specified domain does not exist. | 404 | 请求的域名不存在 |
26932002 | customer not own domain name[{your customer code}] | 400 | 查询的域名不属于当前客户 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/api/config/live-timestampvisitcontrol/123344" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -H "Content-Type:application/json"
HTTP/1.1 200 OK Date: Sun, 05 May 2019 09:08:53 GMT Content-Type: application/json;charset=utf-8 x-cnc-request-id: 83bbebc7-2c95-47d7 { "code":0", "message":"success", data:{ "domainId":"123344", "domainName":"www.example.com", "timestampVisitControlRules":[{ "dataId":"123", "cipherParam":"wsSecret", "timeParam":"wsTime", "secretKey":"yoursecretkey", "timeFormat":"hex", "effectiveTimeMode":"duration", "effectiveTime":"3600", "tolerantTime":"60", "cipheCombination":"time+path+key" }] } }