Query the live stream that has been blocked.
| 파라미터 이름 | 설명 |
|---|---|
*channel | channel |
url | url,Complete push stream or pull stream url |
| 파라미터 이름 | 설명 |
|---|---|
code | result code,00 means success |
message | result message |
resultDetail | Set of task results |
channel | channel |
url | url |
startTime | start time, format:1532413615 |
endTime | end time,format:1532413615 |
ip | ip of forbidden user |
| 에러 코드(code) | 설명(message) | HTTP 상태 코드 | 설명 |
|---|---|---|---|
| 0 | "success" | 200 | success |
| 1 | "username is lack" | 200 | user is unactive |
| 6 | "user[%s] apiCustomer not exist or not allowed push!" | 200 | account not exist or not allowed |
| 28 | "Username[%s] and Channel[%s] does not match." | 200 | The user has no permission to operate the domain name |
| 403 | "parse request body error" | 200 | parse request body error |
| 411 | "channel is require" | 200 | channel is require |
| 417 | "query failed" | 200 | system error |
#!/bin/bash
username="username"
apiKey="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/cm/stream/forbidQuery" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H 'Accept: application/json' \
-d '{
"channel":"www.example.com",
"url":"https://vodtest.lxdns.com/test/1.txt"
}'HTTP/1.1 202 OK
Date: Sun, 11 Feb 2018 08:22:10 GMT
Content-Type: application/json
Content-Length: 86
Connection: keep-alive
x-cnc-request-id: 39c70980-6df2-4fba-813b-8fcedd4e6337
{
"code": "00",
"message": "success",
"resultDetail": [{
"chanel": "vodtest.lxdns.com",
"endTime": 1532413615,
"ip": "",
"startTime": 0,
"url": "https://vodtest.lxdns.com/test/1.txt"
}]
}