推流实时信息查询接口(listPubStreamsInfo)
描述
如果返回的count,和请求的数量一致,则表示后面还有数据,请修改marker,limit继续查询
请求参数
目录 |
类型 |
是否必须 |
缺省值 |
描述 |
Action |
String |
Y |
操作接口名,取值:listPubStreamsInfo |
Version |
String |
Y |
版本号,示例:2016-09-25 |
uniquename |
|
Y |
|
域名标识 |
marker |
unisigned int |
N |
0 |
请求起始游标。当在线流数较多时,为提高接口响应时间,可分多次返回全部在线流信息,游标即索引值,默认为0。 |
limit |
unisigned int |
N |
100 |
限制单次请求返回的记录数,至多可返回5000条,如果大于5000条,则返回5000条 |
app |
string |
app/pubhost 必须存在一个且只存在一个 |
n/a |
推流频道。必填,用于指定返回某个频道下的在线流相关信息。 |
pubhost |
string |
app/pubhost 必须存在一个且只存在一个 |
n/a |
推流域名。必填,用于指定返回某个推流域名下的流相关信息。 |
返回参数
目录 |
类型 |
是否必须 |
缺省值 |
描述 |
errno |
int |
Y |
|
错误码 0:成功;非0:失败 |
errmsg |
string |
N |
|
当errno非0时,errmsg被用于描述本次请求错误的原因 |
count |
int |
Y |
|
单次返回多查询的记录数 |
total |
int |
Y |
|
总共所有记录数 |
result |
json array |
Y |
|
返回流信息的封装结构,详见下面的定义 |
pubdomain |
string |
Y |
|
当前流的推流域名 |
clientip |
string |
Y |
|
当前流的推流IP |
app |
string |
Y |
|
当前流所属频道 |
streamname |
string |
Y |
|
当前流的流名 |
pubtime |
int |
Y |
|
开始推流的时间,格林威治时间格式 |
curfps |
int |
Y |
|
推流的实时帧率(每秒接收帧数) |
curbitrate |
int |
Y |
|
推流的实时码率(每秒接收字节数) |
update_time |
int |
Y |
|
此条流信息的采集时间,格林威治时间格式 |
framelossrate |
float |
Y |
|
推流丢帧率(1 - rxframes / (wintime * metafps)),暂不提供 |
请求示例
https://live.api.ksyun.com/?
Action=llistPubStreamsInfo&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
&接口请求参数
返回示例
{
"errno": 0,
"errmsg": "Success",
"count": 2,
"result": [
{
"pubdomain": "test.uplive.ks-cdn.com",
"clientip": "10.64.7.67",
"app": "live",
"streamname": "m_58cdf6873e2f38f01474891002850100_259",
"pubtime": 1474891236,
"curfps": 15,
"curbitrate": 66826,
"framelossrate": 0
},
{
"pubdomain": "test.uplive.ks-cdn.com",
"clientip": "10.64.2.150",
"app": "live",
"streamname": "m_99434439e8564f4e1474885292528100_259",
"pubtime": 1474891235,
"curfps": 15,
"curbitrate": 69933,
"framelossrate": 0
}
]
}