直播分发
查询已经屏蔽的直播流。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
channel | String | 是 | 加速域名,如果账号没有域名权限,调用成功但接口会返回错误的提示信息。注:一次只能查询一个域名 |
url | String | 否 | 推流或拉流的地址完整的url,即具体某个直播的频道url |
参数名称 | 类型 | 描述 |
---|---|---|
code | String | 表示提交结果,00表示成功 |
message | String | 表示任务提交后,系统的响应消息 |
resultDetail | List | 任务结果的集合 |
channel | String | 禁止推流或拉流的域名 |
url | String | 禁止推流或拉流的地址完整的url |
startTime | String | 开始禁止播放流的时间,格式为 1532413615 |
endTime | String | 流恢复播放的时间,例如 1532413615 |
ip | String | 禁止某个客户观看直播的用户IP |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
0 | "success" | 200 | 查询接收成功 |
1 | "username is lack" | 200 | 该账号没有启用 |
6 | "user[%s] apiCustomer not exist or not allowed push!" | 200 | 账号不存在或没有禁播功能的权限 |
28 | "Username[%s] and Channel[%s] does not match." | 200 | 该账号没有域名权限 |
403 | "parse request body error" | 200 | 接口的语法错误 |
411 | "channel is require" | 200 | channel是必填项,请补充后重新提交一次查询 |
417 | "query failed" | 200 | 查询出现异常,失败了,请联系客技分析 |
#!/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://open.chinanetcenter.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" }] }