describeLiveStreamBandwidthData
描述
查询带宽数据
- 查询某个时间段内的带宽数据(平均带宽)
- 查询1分钟粒度的数据时,时间跨度不超过7天,其他粒度时时间跨度不超过30天
请求方式
GET
请求地址
https://live.jdcloud-api.com/v1/describeLiveStreamBandwidthData
请求参数
名称 |
类型 |
是否必需 |
默认值 |
描述 |
domainName |
String |
False |
|
播放域名,可以通过指定域名查询该域名下产生的带宽数据。
|
appName |
String |
False |
|
推流AppName,将AppName作为查询条件时须指定域名。
|
streamName |
String |
False |
|
流名称,将流名称作为查询条件时须指定域名和AppName。
|
ispName |
String |
False |
|
运营商
|
locationName |
String |
False |
|
地域,如beijing,shanghai。多个用逗号分隔
|
protocolType |
String |
False |
|
查询的流协议类型,取值范围:"rtmp,hdl,hls",多个时以逗号分隔
|
period |
String |
False |
|
查询周期,当前取值范围:“oneMin,fiveMin,halfHour,hour,twoHour,sixHour,day,followTime”,分别表示1min,5min,半小时,1小时,2小时,6小时,1天,跟随时间。默认为空,表示fiveMin。当传入followTime时,表示按Endtime-StartTime的周期,只返回一个点
|
startTime |
String |
True |
|
查询起始时间,UTC时间,格式:yyyy-MM-dd'T'HH:mm:ss'Z'
|
endTime |
String |
False |
|
查询截至时间,UTC时间,格式:yyyy-MM-dd'T'HH:mm:ss'Z',为空时默认为当前时间
|
返回参数
名称 |
类型 |
描述 |
result |
Result |
|
requestId |
String |
ruquestId |
Result
名称 |
类型 |
描述 |
dataList |
BandwidthStatisticResult[ ] |
|
BandwidthStatisticResult
名称 |
类型 |
描述 |
startTime |
String |
时间点
|
endTime |
String |
时间点
|
data |
BandwidthStatisticResultData |
|
BandwidthStatisticResultData
名称 |
类型 |
描述 |
value |
Long |
带宽,单位:bps
|
maxValueTime |
Long |
带宽峰值时间点,单位:秒
|
返回码
返回码 |
描述 |
200 |
OK |
400 |
Invalid parameter |
401 |
Authentication failed |
404 |
Not found |
500 |
Internal server error |
503 |
Service unavailable |
请求示例
GET
https://live.jdcloud-api.com/v1/describeLiveStreamBandwidthData?domainName=xxx
{
"endTime": "2019-03-27T16:00:00Z",
"startTime": "2019-03-26T16:00:00Z"
}
返回示例
{
"requestId": "bgvmivir54gddpgi764se9f4kfr7ge41",
"result": {
"dataList": [
{
"data": {},
"endTime": "2019-03-26T07:30:00Z",
"startTime": "2019-03-26T07:29:00Z"
},
{
"data": {
"maxValueTime": 1553585460,
"value": 25131560
},
"endTime": "2019-03-26T07:31:00Z",
"startTime": "2019-03-26T07:30:00Z"
},
{
"data": {
"maxValueTime": 1553585520,
"value": 50263120
},
"endTime": "2019-03-26T07:32:00Z",
"startTime": "2019-03-26T07:31:00Z"
}
]
}
}