查询流媒体时间戳防盗链配置

更新时间:2022-12-13 11:37:52

适用产品

直播分发

接口描述

通过接口自助查询流媒体时间戳防盗链配置。接口url的*可为域名名称或域名id。

推荐使用 Open API在线调试

Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试

请求参数

Path 参数

参数名称描述
*domainString
需要查询配置的域名(domainName)或域名id(domainId)

返回参数

Body 参数

参数名称描述
codeString
错误代码,当HTTPStatus不为200时出现,表示当前请求调用的错误类型
messageString
响应信息,成功时为success
dataQueryLivestreamingTimestampAntihotlinkingConfigResponseData
响应数据
domainIdString
domainNameString
timestampVisitControlRulesList
流媒体防盗链配置,父标签 1.需要设置流媒体防盗链配置时,此项必填 2.为时清空配置
cipherParamString
密文参数名称,未入参则默认值为wsSecret
timeParamString
时间参数名称,未入参则默认值为wsTime
secretKeyString
密钥
timeFormatString
加密时间格式,必填,可选值为【UNIX timestamp】和【hex】,分别为【UNIX时间戳】、【16进制】。
effectiveTimeModeString
有效时间计算方式,可选值:duration、abstime、no verification 1、duration,表示按时长。设置为“按时长”,则effectiveTime必填。 2、abstime,表示按绝对时间。支持某个url到某个未来时间有效(最大支持3652天) 3、no verification,表示不校验时间。则自动清空effectiveTime。
effectiveTimeInteger
有效时长,单位秒(s),正整数,值要>=1。
tolerantTimeInteger
容忍值,误差时间,单位秒(s),正整数,值要>=1
cipheCombinationString
密文组合方式,可选值为以下六项: key+path+time key+time+path path+key+time path+time+key time+path+key time+key+path
dataIdInteger
配置多组配置时,具体某组配置的id。dataId可以通过查询接口获取。 注意: a、如果有传dataId,说明指定修改其中一组配置项内容,不需求修改其他组配置内容不需要入参; b、如果入参多组配置,其中有些组配置有传dataId,有些没有传,则有传dataId的表示修改具体某组配置,没有传dataId的表示在原来基础上新增一组配置; c、如果入参都没有传dataId,表示用本次的配置全量覆盖原先配置; d、如果入参没有传任何配置项参数,只传了域名和二级标签,表示清空这个接口对应域名二级服务所有配置; e、如果一组配置没有具体的配置项,则dataId必填,且值为实际存在的dataId,表示清空这个dataId对应配置项的值;不允许一组配置没有具体的配置项也没有dataId。
x-cnc-request-idString
唯一标示的id,用于查询每次请求的任务 (适用全部接口)

错误码

错误代码(code)描述(message)HTTP状态码语义
26939999We encountered an internal error. Please try again.500系统内部错误,请联系技术支持。
0success200请求成功
26932001The specified domain does not exist.404请求的域名不存在
26932002customer not own domain name[{your customer code}]400查询的域名不属于当前客户

示例

JSON
XML
JSON
请求示例
复制代码 复制成功
#!/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"
		}]
	}
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!