Media Acceleration-Live

QueryLivestreamingTimestampAntihotlinkingConfig

Update time: 2022-12-13 11:37:52

Query streaming media timestamp visit control. The interface * can be domain name or domain id.

  • Limit of request rate per user: 300/5min
  • Applicable Products: Media Acceleration-Live
For API authentication details, please refer to: API Authentication Overview

Request

Path Params

NameDescription
*domainString

Domain name or domain name id to query configuration

Response

Body Params

NameDescription
codeString

The error code, when HTTPStatus is not 200, indicates the type of error the current request is calling.

messageString

Response information, when success is successful

dataQueryLivestreamingTimestampAntihotlinkingConfigResponseData

The response data

domainIdString
domainNameString
timestampVisitControlRulesList

Streaming media anti-hotlinking configuration, parent tag

  1. This must be filled when the hotlinking configuration of streaming media needs to be set
  2. Empty the configuration for <timestampVisitControls/>
cipherParamString

The name of the time parameter, and the default value is wsTime if no parameters are entered.

timeParamString

The name of the time parameter, and the default value is wsTime if no parameters are entered.

secretKeyString

The secret key

timeFormatString

The encrypted time format, is required, with values of [UNIX timestamp] and [hex], corresponding to [UNIX timestamp] and [hex], respectively.

effectiveTimeModeString

Effective time method, optional values: duration, abstime, no verification.

  1. duration, means get effective time by duration. When this mode is set, effectiveTime is required.
  2. abstime, means get effective time by absolute time. Support a URL to be valid for a certain future time (the maximum 3652 days)
  3. No verification, means it will not verify the time. When this mode is set, effectiveTime will be cleared cleaned.
effectiveTimeInteger

The effective length, unit second (s), positive integer,and value >=1

tolerantTimeInteger

The tolerance value, error time, unit second (s), positive integer and value >=1

cipheCombinationString

Ciphertext combination mode, with the following six optional values:

key+path+time key+time+path path+key+time path+time+key time+path+key time+key+path

dataIdInteger

Data-id is to indicate a specific group configuration when the client has multiple groups of configurations. Data-id can be retrieved through a query interface. Note: A. If data-id is passed, it means that one group of configuration items is specified to be modified, and no other group configuration items need to be modified. B. If multiple groups of configurations are included, some of them are configured with data-id and others are not, then the expression of data-id is used to modify a specific group of configurations, and a new group of configurations is added on the original basis without the expression of data-id. C. If the data-id is not transmitted, it means that the original configuration will be fully covered by this configuration. D. If no configuration parameter is passed, only domain name and secondary label are passed, which means that all configuration of domain name secondary service corresponding to this interface is cleared. E. If there is no specific configuration item in a set of configurations, the data-id must be filled in, and the value is the actual data-id, which means clearing the value of the corresponding data-id configuration item; it is not allowed that there is no specific configuration item or data-id in a set of configurations.

x-cnc-request-idString

Uniquely labeled id for querying each requested task (for all interfaces)

Error code

Error code(code)Description(message)HTTP statusSemantic
26939999

We encountered an internal error. Please try again.

500System internal error, please contact technical support.
0

success

200The request is successful
26932001

The specified domain does not exist.

404The specified domain does not exist.
26932002

customer not own domain name[{your customer code}]

400customer not own domain name[{your customer code}]

Example

JSON
XML
JSON
Request example
Copy Copy success
#!/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://api.cdnetworks.com/api/config/live-timestampvisitcontrol/123344" \
-X "GET" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H "Content-Type:application/json"
Response example
Copy Copy success
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"
		}]
	}
}
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!