转推历史错误统计接口(listRelayErrInfo)
描述
转推历史错误统计接口
请求参数
目录 |
类型 |
是否必须 |
缺省值 |
描述 |
Action |
String |
Y |
n/a |
操作接口名,取值:listRelayErrInfo |
Version |
String |
Y |
n/a |
版本号,示例:2016-09-25 |
uniquename |
|
Y |
n/a |
域名标识 |
marker |
unisigned int |
N |
0 |
限制单次请求返回的记录数,至多可返回100条。 |
limit |
unisigned int |
N |
100 |
单次返回流的最大数量。指定该值,能提升接口响应速度,将实现分页的功能 |
app |
string |
app/pubhost 必须存在一个且只存在一个 |
n/a |
推流频道。必填,用于指定返回某个频道下的在线流相关信息。 |
starttime |
unisigned int |
N |
n/a |
查询范围起始时间。格式为年月日时 ,例如2016083010 。 |
duration |
unisigned int |
N |
n/a |
查询范围。必填,单位:小时。若查询范围超过5天,那么查询结果将返回近5天的数据。 |
返回参数
目录 |
类型 |
是否必须 |
描述 |
errno |
int |
Y |
错误码 0:成功;非0:失败 |
errmsg |
string |
N |
当errno非0时,errmsg被用于描述本次请求错误的原因 |
starttime |
string |
N |
统计的时间起点,精确到小时,如2016083010,即2016/8/30 10:00:00;不指定时,按duration返回最新n小时的统计数据 |
duration |
int |
Y |
统计的时长,单位:小时 |
count |
int |
Y |
单次返回多查询的记录数 |
result |
json array |
Y |
返回流信息的封装结构,详见下面的定义 |
app |
string |
Y |
当前流所属频道 |
streamname |
string |
Y |
当前流的流名 |
pubtime |
int |
Y |
转推开始时间 |
stoptime |
int |
Y |
转推结束时间,格林威治时间格式 |
detail |
|
Y |
详细描述错误统计信息,具体字段如下 |
clientip |
string |
Y |
转推IP,不保证一定能拿到外网 |
pubdomain |
string |
Y |
转推服务器domain |
time |
int |
Y |
错误产生的时间点,Unix Time |
errcode |
unsigned int |
Y |
错误码 |
请求示例
https://live.api.ksyun.com/?
Action=listRelayErrInfo&Version=2016-09-25
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKLTGo0pHK-EQWiDZWTSBSll2Q%2F20160914%2Fcn-beijing-6%2Fiam%2Faws4_request
&X-Amz-Date=20160914T114902Z
&X-Amz-SignedHeaders=host
&X-Amz-Signature=88f6284257863dedfc350da05d19d07f76cca622e93b829f5ce26c1a75d3da39
&接口请求参数
返回示例
{
"count": 20,
"duration": 120,
"errmsg": "success",
"errno": 0,
"result": {
"wangshuai090913": {
"app": "live",
"detail": [
{
"clientip": "",
"errcode": "400",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474957231"
},
{
"clientip": "",
"errcode": "400",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474957356"
}
],
"pubtime": "1473401150",
"stoptime": "",
"streamname": "wangshuai090913"
},
"wangshuai1420": {
"app": "live",
"detail": [
{
"clientip": "",
"errcode": "440",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474957926"
},
{
"clientip": "",
"errcode": "440",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474958051"
}
],
"pubtime": "1473401973",
"stoptime": "",
"streamname": "wangshuai1420"
},
"wangshuai1430": {
"app": "live",
"detail": [
{
"clientip": "",
"errcode": "400",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474959701"
},
{
"clientip": "",
"errcode": "400",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474959826"
},
{
"clientip": "",
"errcode": "400",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474959950"
},
{
"clientip": "",
"errcode": "400",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474960075"
},
{
"clientip": "",
"errcode": "400",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474960200"
}
],
"pubtime": "1473402622",
"stoptime": "",
"streamname": "wangshuai1430"
},
"wangshuai1514": {
"app": "live",
"detail": [
{
"clientip": "",
"errcode": "440",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474960505"
},
{
"clientip": "",
"errcode": "440",
"pubdomain": "support.uplive.ks-cdn.com:1935",
"time": "1474960508"
}
],
"pubtime": "1473405303",
"stoptime": "",
"streamname": "wangshuai1514"
}
},
"starttime": "2016092400"
}
错误码
转推错误(errcode) |
错误描述 |
440 |
连接超时 |
441 |
socket被对端reset |
442 |
服务端拒绝连接 |
443 |
服务端主动断开 |
450 |
未知错误 |