文档中心 API文档 查询已禁播流名

查询已禁播流名

更新时间:2022-12-14 16:12:25

适用产品

直播分发

接口描述

查询已经屏蔽的直播流。

推荐使用 Open API在线调试

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

请求参数

Body 参数

参数名称描述
*channelString
加速域名,如果账号没有域名权限,调用成功但接口会返回错误的提示信息。注:一次只能查询一个域名
urlString
推流或拉流的地址完整的url,即具体某个直播的频道url

返回参数

Body 参数

参数名称描述
codeString
表示提交结果,00表示成功
messageString
表示任务提交后,系统的响应消息
resultDetailList
任务结果的集合
channelString
禁止推流或拉流的域名
urlString
禁止推流或拉流的地址完整的url
startTimeString
开始禁止播放流的时间,格式为 1532413615
endTimeString
流恢复播放的时间,例如 1532413615
ipString
禁止某个客户观看直播的用户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"200channel是必填项,请补充后重新提交一次查询
417"query failed"200查询出现异常,失败了,请联系客技分析

示例

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