统计接口
查询统计数据
接口描述
查询特定Domain的统计数据。
请求语法
1GET /v<version>/statistics/domain/<playDomain>?startDate=<startDate>&endDate=<endDate>&aggregate={true | false} HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
playDomain | String | 直播域名 | 是 |
startDate | String | 起始时间 | 是 |
endDate | String | 结束时间 | 是 |
aggregate | boolean | 指定是否聚合,即数据聚合统计或按日统计。有效值:true、false,默认值: false。为true时聚合统计;否则按日统计 | 否 |
请求示例
1GET /v5/statistics/domain/play.e-web.com.cn?startDate=20160202&endDate=20160205 HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
domain | String | 直播域名 |
startDate | String | 起始日期 |
endDate | Number | 结束日期 |
aggregate | Object | 聚合统计数据,仅当aggregate=true 时存在 |
+durationInMinute | Number | 直播总时长 |
+peakPlayCount | Number | 当天峰值播放人数 |
+peakBandwidthInBps | Number | 峰值带宽 |
+downstreamInByte | Number | 总下行流量 |
+playCount | Number | 累计播放请求数,等于用户累计播放时长,单位:分钟 |
statistics | Object | 按日统计数据 |
+date | String | 数据日期 |
+durationInMinute | Number | 直播总时长 |
+peakPlayCount | Number | 当天峰值播放人数 |
+peakBandwidthInBps | Number | 峰值带宽 |
+downstreamInByte | Number | 总下行流量 |
+playCount | Number | 累计播放请求数,等于用户累计播放时长,单位:分钟 |
响应示例
-
aggregate值为true
Plain Text1 HTTP/1.1 200 OK 2 x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d 3 Date: Fri, 03 Jul 2015 09:28:13 GMT 4 Transfer-Encoding: chunked 5 Content-Type: application/json;charset=UTF-8 6 Cache-Control: no-cache 7 { 8 "domain": "play.e-web.com.cn", 9 "startDate": 20160101, 10 "endDate": 20160201, 11 "aggregate": { 12 "durationInMinute": 200, 13 "peakPlayCount": 100, 14 "peakBandwidthInBps": 100, 15 "downstreamInByte": 10000, 16 "playCount": 200 17 } 18 }
-
aggregate值为false
Plain Text1 HTTP/1.1 200 OK 2 x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d 3 Date: Fri, 03 Jul 2015 09:28:13 GMT 4 Transfer-Encoding: chunked 5 Content-Type: application/json;charset=UTF-8 6 Cache-Control: no-cache 7 { 8 "domain": "play.e-web.com.cn", 9 "startDate": 20160101, 10 "endDate": 20160201, 11 "statistics":[ 12 { 13 "date": "20160202", 14 "durationInMinute": 100, 15 "peakPlayCount": 100, 16 "peakBandwidthInBps": 100, 17 "downstreamInByte": 10000, 18 "playCount": 100 19 },{ 20 "date": "20160203", 21 "durationInMinute": 100, 22 "peakPlayCount": 100, 23 "peakBandwidthInBps": 100, 24 "downstreamInByte": 10000, 25 "playCount": 50 26 }... 27 ] 28 }
查询统计概要
接口描述
查询当前用户所有Domain的统计概要。
请求语法
1GET /v<version>/statistics/domain/summary?startTime=<startTime>&endTime=<endTime> HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
startTime | String | 起始时间 | 是 |
endTime | String | 结束时间 | 否 |
请求示例
1GET /v5/statistics/domain/summary/?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-18T00%3a00%3a00Z HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
startTime | String | 统计数据起始时间 |
endTime | String | 统计数据截止时间 |
summary | Object | 统计概要 |
+downStreamInByte | Number | 累计总流量 |
+durationInMinute | Number | 累计直播时长 |
+playCount | Number | 累计播放时长 |
+transcoding | Number | 累计转码时长(分钟) |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "startTime": "2016-01-01T00:00:00Z",
9 "endTime": "2016-01-01T10:00:00Z",
10 "summary": {
11 "downStreamInByte": 12300000,
12 "durationInMinute":1234,
13 "playCount": 200
14 }
15}
查询总请求数
接口描述
查询当前用户所有Domain的总请求数。
请求语法
1GET /v<version>/statistics/table/domain/playcount?startTime=<startTime>&endTime=<endTime>&timeInterval={LONG_TERM | MID_TERM | SHORT_TERM}&allDomain={true | false} HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
startTime | String | 起始时间 | 是 |
endTime | String | 结束时间 | 是 |
timeInterval | enum | 时间间隔,有效值:LONG_TERM(每天)、MID_TERM(每小时)、SHORT_TERM(每5分钟) | 是 |
allDomain | boolean | true查询全部域名,默认为false | 是 |
请求示例
1GET /v5/statistics/table/domain/playcount?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-19T00%3a00%3a00Z&timeInterval=LONG_TERM&allDomain=true
2HTTP/1.1
3host: lss.bj.baidubce.com
4content-type: application/json
5authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
domain | String | 直播域名 |
startTime | String | 统计数据起始时间 |
endTime | String | 统计数据截止时间 |
timeInterval | enum | LONG_TERM, SHORT_TERM, MID_TERM |
hlsStatistics | Object | hls请求数数组 |
+timestamp | String | 数据时间点 |
+playCount | Number | 播放请求数 |
\flvStatistics | Object | flv请求数数组 |
+timestamp | String | 数据时间点 |
+playCount | Number | 播放请求数 |
rtmpStatistics | Object | rtmp请求数数组 |
+timestamp | String | 数据时间点 |
+playCount | Number | 播放请求数 |
totalStatistics | Object | 总请求数数组 |
+timestamp | String | 数据时间点 |
+playCount | Number | 播放请求数 |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "startTime": "2016-01-01T00:00:00Z",
9 "endTime": "2016-01-04T00:00:00Z",
10 "timeInterval": "LONG_TERM",
11 "hlsStatistics":[
12 {
13 "timestamp": "2016-01-01T00:00:00Z",
14 "playCount": 50
15 },{
16 "timestamp": "2016-01-02T00:00:00Z",
17 "playCount": 0
18 },{
19 "timestamp": "2016-01-03T00:00:00Z",
20 "playCount": 20
21 }
22 ],
23 "flvStatistics":[
24 {
25 "timestamp": "2016-01-01T00:00:00Z",
26 "playCount": 40
27 },{
28 "timestamp": "2016-01-02T00:00:00Z",
29 "playCount": 0
30 },{
31 "timestamp": "2016-01-03T00:00:00Z",
32 "playCount": 10
33 }
34 ],
35 "rtmpStatistics":[
36 {
37 "timestamp": "2016-01-01T00:00:00Z",
38 "playCount": 30
39 },{
40 "timestamp": "2016-01-02T00:00:00Z",
41 "playCount": 0
42 },{
43 "timestamp": "2016-01-03T00:00:00Z",
44 "playCount": 40
45 }
46 ],
47 "totalStatistics":[
48 {
49 "timestamp": "2016-01-01T00:00:00Z",
50 "playCount": 120
51 },{
52 "timestamp": "2016-01-02T00:00:00Z",
53 "playCount": 0
54 },{
55 "timestamp": "2016-01-03T00:00:00Z",
56 "playCount": 70
57 }
58 ]
59}
查询请求数
接口描述
查询特定Domain的请求数。
请求语法
1GET /v<version>/statistics/domain/<playDomain>/playcount?startTime=<startTime>&endTime=<endTime>&timeInterval={LONG_TERM | MID_TERM | SHORT_TERM}
2HTTP/1.1
3host: lss.bj.baidubce.com
4content-type: application/json
5authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
playDomain | String | 直播域名 | 是 |
startTime | String | 起始时间 | 是 |
endTime | String | 结束时间 | 是 |
timeInterval | enum | 时间间隔,有效值:LONG_TERM(每天)、MID_TERM(每小时)、SHORT_TERM(每5分钟) | 是 |
请求示例
1GET /v5/statistics/table/domain/demo.domain.com/playcount?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-19T00%3a00%3a00Z&timeInterval=LONG_TERM
2HTTP/1.1
3host: lss.bj.baidubce.com
4content-type: application/json
5authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
domain | String | 直播域名 |
startTime | String | 统计数据起始时间 |
endTime | String | 统计数据截止时间 |
timeInterval | enum | LONG_TERM, SHORT_TERM, MID_TERM |
hlsStatistics | Object | hls请求数数组 |
+timestamp | String | 数据时间点 |
+playCount | Number | 播放请求数 |
flvStatistics | Object | flv请求数数组 |
+timestamp | String | 数据时间点 |
+playCount | Number | 播放请求数 |
rtmpStatistics | Object | rtmp请求数数组 |
+timestamp | String | 数据时间点 |
+playCount | Number | 播放请求数 |
totalStatistics | Object | 总请求数数组 |
+timestamp | String | 数据时间点 |
+playCount | Number | 播放请求数 |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "domain": "play.e-web.com.cn",
9 "startTime": "2016-01-01T00:00:00Z",
10 "endTime": "2016-01-04T00:00:00Z",
11 "timeInterval": "LONG_TERM",
12 "hlsStatistics":[
13 {
14 "timestamp": "2016-01-01T00:00:00Z",
15 "playCount": 50
16 },{
17 "timestamp": "2016-01-02T00:00:00Z",
18 "playCount": 0
19 },{
20 "timestamp": "2016-01-03T00:00:00Z",
21 "playCount": 20
22 }
23 ],
24 "flvStatistics":[
25 {
26 "timestamp": "2016-01-01T00:00:00Z",
27 "playCount": 40
28 },{
29 "timestamp": "2016-01-02T00:00:00Z",
30 "playCount": 0
31 },{
32 "timestamp": "2016-01-03T00:00:00Z",
33 "playCount": 10
34 }
35 ],
36 "rtmpStatistics":[
37 {
38 "timestamp": "2016-01-01T00:00:00Z",
39 "playCount": 30
40 },{
41 "timestamp": "2016-01-02T00:00:00Z",
42 "playCount": 0
43 },{
44 "timestamp": "2016-01-03T00:00:00Z",
45 "playCount": 40
46 }
47 ],
48 "totalStatistics":[
49 {
50 "timestamp": "2016-01-01T00:00:00Z",
51 "playCount": 120
52 },{
53 "timestamp": "2016-01-02T00:00:00Z",
54 "playCount": 0
55 },{
56 "timestamp": "2016-01-03T00:00:00Z",
57 "playCount": 70
58 }
59 ]
60}
查询总带宽
接口描述
查询当前用户所有Domain的总带宽。
请求语法
1GET /v<version>/statistics/table/domain/bandwidth?startTime=<startTime>&endTime=<endTime>&timeInterval={LONG_TERM | MID_TERM | SHORT_TERM}&allDomain={true | false} HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
startTime | String | 起始时间 | 是 |
endTime | String | 结束时间 | 是 |
timeInterval | enum | 时间间隔,有效值:LONG_TERM(每天)、MID_TERM(每小时)、SHORT_TERM(每5分钟) | 是 |
allDomain | boolean | true查询全部域名,默认为false, | 是 |
请求示例
1GET /v5/statistics/table/domain/bandwidth?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-19T00%3a00%3a00Z&timeInterval=LONG_TERM&allDomain=true
2HTTP/1.1
3host: lss.bj.baidubce.com
4content-type: application/json
5authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
startTime | String | 统计数据起始时间 |
endTime | String | 统计数据截止时间 |
timeInterval | String | 时间间隔粒度 |
statistics | Object | 统计数据数组 |
+timestamp | String | 数据时间点 |
+bandwidthInBps | Number | 平均带宽,单位:bps (bit per second) |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "startTime": "2016-01-01T00:00:00Z",
9 "endTime": "2016-01-01T10:00:00Z",
10 "timeInterval" : "SHORT_TERM",
11 "statistics":[
12 {
13 "timestamp": "2016-01-01T00:00:00Z",
14 "bandwidthInBps": 100
15 },{
16 "timestamp": "2016-01-01T00:05:00Z",
17 "bandwidthInBps": 0
18 },{
19 "timestamp": "2016-01-01T00:10:00Z",
20 "bandwidthInBps": 150
21 }
22 ]
23}
查询带宽
接口描述
查询特定Domain的带宽。
请求语法
1GET /v<version>/statistics/table/domain/<playDomain>/bandwidth?startTime=<startTime>&endTime=<endTime>&timeInterval={LONG_TERM | MID_TERM | SHORT_TERM}
2HTTP/1.1
3host: lss.bj.baidubce.com
4content-type: application/json
5authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
playDomain | String | 直播域名 | 是 |
startTime | String | 起始时间 | 是 |
endTime | String | 结束时间 | 是 |
timeInterval | enum | 时间间隔,有效值:LONG_TERM(每天)、MID_TERM(每小时)、SHORT_TERM(每5分钟) | 是 |
请求示例
1GET /v5/statistics/table/demo.domain.com/bandwidth?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-19T00%3a00%3a00Z&timeInterval=LONG_TERM&allDomain=true
2HTTP/1.1
3host: lss.bj.baidubce.comss.bj.baidubce.com
4content-type: application/json
5authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
startTime | String | 统计数据起始时间 |
endTime | String | 统计数据截止时间 |
timeInterval | String | 时间间隔粒度 |
statistics | Object | 统计数据数组 |
+timestamp | String | 数据时间点 |
+bandwidthInBps | Number | 平均带宽,单位:bps (bit per second) |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "startTime": "2016-01-01T00:00:00Z",
9 "endTime": "2016-01-01T10:00:00Z",
10 "timeInterval" : "SHORT_TERM",
11 "statistics":[
12 {
13 "timestamp": "2016-01-01T00:00:00Z",
14 "bandwidthInBps": 100
15 },{
16 "timestamp": "2016-01-01T00:05:00Z",
17 "bandwidthInBps": 0
18 },{
19 "timestamp": "2016-01-01T00:10:00Z",
20 "bandwidthInBps": 150
21 }
22 ]
23}
查询总流量
接口描述
查询当前用户所有Domain的总流量。
请求语法
1GET /v<version>/statistics/table/domain/traffic?startTime=<startTime>&endTime=<endTime>&timeInterval={LONG_TERM | MID_TERM | SHORT_TERM}&allDomain={true | false} HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
startTime | String | 起始时间,采用UTC时间 | 是 |
endTime | String | 结束时间,采用UTC时间 | 是 |
timeInterval | enum | 时间间隔,有效值:LONG_TERM(每天)、MID_TERM(每小时)、SHORT_TERM(每5分钟) | 是 |
allDomain | boolean | true查询全部域名,默认为false, | 是 |
请求示例
1GET /v5/statistics/table/domain/traffic?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-18T00%3a00%3a00Z&timeInterval=SHORT_TERM&allDomain=true
2HTTP/1.1
3host: lss.bj.baidubce.com
4content-type: application/json
5authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
domain | String | 直播域名 |
startTime | String | 统计数据起始时间 |
endTime | String | 统计数据截止时间 |
timeInterval | String | 时间间隔 |
statistics | Object | 统计数据数组 |
+timestamp | String | 数据时间点 |
+downstreamInByte | Number | 下行流量 |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "startTime": "2016-01-01T00:00:00Z",
9 "endTime": "2016-01-01T10:00:00Z",
10 "timeInterval": "SHORT_TERM",
11 "statistics":[
12 {
13 "timestamp": "2016-01-01T00:00:00Z",
14 "downstreamInByte": 100
15 },{
16 "timestamp": "2016-01-01T00:10:00Z",
17 "downstreamInByte": 0
18 },{
19 "timestamp": "2016-01-01T00:20:00Z",
20 "downstreamInByte": 150
21 }
22 ]
23}
查询流量
接口描述
查询特定Domain的流量。
请求语法
1GET /v<version>/statistics/table/domain/<playDomain>/traffic?startTime=<startTime>&endTime=<endTime>&timeInterval={LONG_TERM | MID_TERM | SHORT_TERM} HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
playDomain | String | 直播域名 | 是 |
startTime | String | 起始时间 | 是 |
endTime | String | 结束时间 | 是 |
timeInterval | enum | 时间间隔,有效值:LONG_TERM(每天)、MID_TERM(每小时)、SHORT_TERM(每5分钟) | 是 |
请求示例
1GET /v5/statistics/table/domain/demo.domain.com/traffic?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-18T00%3a00%3a00Z&timeInterval=SHORT_TERM HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
domain | String | 直播域名 |
startTime | String | 统计数据起始时间,精确到秒级,按输入的时间间隔查询数据。 |
endTime | String | 统计数据截止时间,精确到秒级,按输入的时间间隔查询数据。 |
timeInterval | String | 时间间隔 |
statistics | Object | 统计数据数组 |
+timestamp | String | 数据时间点 |
+downstreamInByte | Number | 下行流量 |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "domain": "play.e-web.com.cn",
9 "startTime": "2016-01-01T00:00:00Z",
10 "endTime": "2016-01-01T10:00:00Z",
11 "timeInterval": "SHORT_TERM",
12 "statistics":[
13 {
14 "timestamp": "2016-01-01T00:00:00Z",
15 "downstreamInByte": 100
16 },{
17 "timestamp": "2016-01-01T00:10:00Z",
18 "downstreamInByte": 0
19 },{
20 "timestamp": "2016-01-01T00:20:00Z",
21 "downstreamInByte": 150
22 }
23 ]
24}
查询所有Domain数据
接口描述
查询当前用户的所有Domain数据。
请求语法
1GET /v<version>/statistics/domain/list?startTime=<startTime>&endTime=<endTime>&[orderBy=<orderRules>&keywordType=<keywordType>&keyword=<keyword>] HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
startTime | Date | 开始时间,精确到秒级,按输入的时间间隔查询数据。 | 是 |
endTime | Date | 结束时间,精确到秒级,按输入的时间间隔查询数据。 | 否 |
orderBy | String | 排序关键字。有效值:domain, downstream,duration,peak_bandwidth,peak_play_count,play_count。默认按流量降序排列 | 否 |
keywordType | String | 搜索关键字类型。默认值:domain | 否 |
keyword | String | 搜索关键字,"",表示匹配所有 | 否 |
请求示例
1GET /v5/statistics/domain/list?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-18T00%3a00%3a00Z&orderBy=domain&keywordType=domain&keyword={keyword} HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
domainStatisticsList | Object | domain数据列表 |
+domain | String | 直播域名 |
+startTime | String | 统计数据起始时间 |
+endTime | String | 统计数据截止时间 |
+aggregate | Object | 统计数据聚合 |
++durationInMinute | Number | 直播总时长 |
++peakPlayCount | Number | 当天峰值播放人数 |
++peakBandwidthInBps | Number | 峰值带宽 |
++downstreamInByte | Number | 总下行流量 |
++playCount | Number | 累计播放请求数(每用户每播放一分钟算一次请求),等于用户累计播放时长,单位:分钟 |
++transcoding | Number | 累计转码时长(分钟) |
响应示例
1 HTTP/1.1 200 OK
2 x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3 Date: Fri, 03 Jul 2015 09:28:13 GMT
4 Transfer-Encoding: chunked
5 Content-Type: application/json;charset=UTF-8
6 Cache-Control: no-cache
7 {
8 "domainStatisticsList": [
9 {
10 "domain": "play.e-web.com.cn",
11 "startDate": 2016-01-01T00:00:00Z,
12 "endDate": 2016-01-05T00:00:00Z,
13 "aggregate": {
14 "durationInMinute": 200,
15 "peakPlayCount": 100,
16 "peakBandwidthInBps": 100,
17 "downstreamInByte": 10000,
18 "playCount": 200
19 },
20 {
21 "domain": "test.e-web.com.cn",
22 "startDate": 20160101,
23 "endDate": 20160201,
24 "aggregate": {
25 "durationInMinute": 200,
26 "peakPlayCount": 100,
27 "peakBandwidthInBps": 100,
28 "downstreamInByte": 10000,
29 "playCount": 200
30 }
31 ]
32 }
查询所有Stream数据
接口描述
查询当前用户特定Domain下的所有Stream数据。
请求语法
1GET /v{version}/statistics/domain/{domain}/stream?app={app}&startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-18T00%3a00%3a00Z&orderBy=app&keywordType=stream&keyword={keyword} HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 | 可选值 | 默认值 |
---|---|---|---|---|---|
Domain | String | 直播域名 | 是 | - | - |
app | String | app 名称 | 是 | - | - |
startTime | Date | 起始时间 | 是 | - | - |
endTime | Date | 结束时间 | 是 | - | - |
orderBy | String | 排序关键字,默认升序,加desc可以降序 | 是 | downstream,duration,peak_bandwidth, peak_play_count,play_count, "downstream desc", ... |
- |
keywordType | String | 搜索关键字类型 | 否 | stream | stream |
keyword | String | 搜索关键字 | 否 | - | ””,空表示匹配所有 |
pageNo | Int | 页数 | 否 | 大于0的整数,例如1 | 1 |
pageSize | Int | 每页的条数 | 否 | 大于0的整数,例如20 | 20 |
请求示例
1GET /v5/statistics/domain/demo.domaim.com/stream?app=myapp&startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-18T00%3a00%3a00Z&orderBy=app&keywordType=stream&keyword={keyword} HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
streamStatisticsList | Object | stream数据列表 |
+startDate | String | 统计数据起始日期 |
+endDate | String | 统计数据截止日期 |
+app | String | 应用名称 |
+stream | String | 流名称 |
+aggregate | Object | 统计数据聚合 |
++durationInMinute | Number | 直播总时长 |
++peakPlayCount | Number | 当天峰值播放人数 |
++peakBandwidthInBps | Number | 峰值带宽 |
++downstreamInByte | Number | 总下行流量 |
++playCount | Number | 累计播放请求数,等于用户累计播放时长,单位:分钟 |
++transcoding | Number | 累计转码时长(分钟) |
totalCount | Number | 总共stream的数量,并不一定等于该列表的长度 |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "totalCount": 236,
9 "streamStatisticsList": [
10 {
11 "app": "testapp",
12 "stream": "teststream",
13 "startDate": 20160101,
14 "endDate": 20160201,
15 "aggregate": {
16 "durationInMinute": 200,
17 "peakPlayCount": 100,
18 "peakBandwidthInBps": 100,
19 "downstreamInByte": 10000,
20 "playCount": 200,
21 "transcoding": 0
22 },
23 {
24 "app": "testapp1",
25 "stream": "teststream1",
26 "startDate": 20160101,
27 "endDate": 20160201,
28 "aggregate": {
29 "durationInMinute": 200,
30 "peakPlayCount": 100,
31 "peakBandwidthInBps": 100,
32 "downstreamInByte": 10000,
33 "playCount": 200,
34 "transcoding": 0
35 }
36 ]
37}
查询特定Stream数据
接口描述
查询特定Domain下的特定Stream数据。
请求语法
1GET /v<version>/statistics/domain/<playDomain>/app/<app>/stream/<stream>?startDate=<startDate>&endDate=<endDate>&aggregate={true | false} HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
playDomain | String | 直播域名 | 是 |
app | String | 应用名称 | 是 |
stream | String | 流名称 | 是 |
startDate | String | 起始时间,默认为当天时间,若参数错误也默认为当天 | 是 |
endDate | String | 结束时间,,默认为当天时间,若参数错误也默认为当天 | 是 |
aggregate | boolean | 指定是否聚合,即数据聚合统计或按日统计。有效值:true、false,默认值: false。为true时聚合统计;否则按日统计 | 否 |
请求示例
1GET /v5/statistics/domain/demo.domain.com/app/myapp/stream/mystream?startDate=20160118&endDate=20160128&aggregate=true HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
app | String | 应用名称 |
stream | String | 流名称 |
startDate | String | 起始日期 |
endDate | Number | 结束日期 |
statistics | Object | 统计数据数组 |
+date | String | 数据日期 |
+durationInMinute | Number | 直播总时长 |
+peakPlayCount | Number | 当天峰值播放人数 |
+peakBandwidthInBps | Number | 峰值带宽 |
+downstreamInByte | Number | 总下行流量 |
+playCount | Number | 累计播放请求数 |
aggregate | Object | 聚合数据,只有请求参数设置aggregate=true 时才返回。 |
+durationInMinute | Number | 直播总时长 |
+peakPlayCount | Number | 当天峰值播放人数 |
+peakBandwidthInBps | Number | 峰值带宽 |
+downstreamInByte | Number | 总下行流量 |
+playCount | Number | 累计播放请求数 |
响应示例
aggregate
和 statistics
数据仅返回一份,当aggregate=true
时,返回aggregate类别数据;当aggregate=false
时,返回statistics类别数据。
-
aggregate值为true
Plain Text1 HTTP/1.1 200 OK 2 x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d 3 Date: Fri, 03 Jul 2015 09:28:13 GMT 4 Transfer-Encoding: chunked 5 Content-Type: application/json;charset=UTF-8 6 Cache-Control: no-cache 7 { 8 "domain": "play.e-web.com.cn", 9 "app": "test_stream", 10 "stream": "test_stream", 11 "startDate": 20160101, 12 "endDate": 20160201, 13 "aggregate": { 14 "durationInMinute": 200, 15 "peakPlayCount": 100, 16 "peakBandwidthInBps": 100, 17 "downstreamInByte": 10000, 18 "playCount": 200 19 } 20 }
-
aggregate值为false
Plain Text1HTTP/1.1 200 OK 2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d 3Date: Fri, 03 Jul 2015 09:28:13 GMT 4Transfer-Encoding: chunked 5Content-Type: application/json;charset=UTF-8 6Cache-Control: no-cache 7{ 8 "domain": "play.e-web.com.cn", 9 "app": "test_stream", 10 "stream": "test_stream", 11 "startDate": 20160101, 12 "endDate": 20160201, 13 "statistics":[ 14 { 15 "date": "20160202", 16 "durationInMinute": 100, 17 "peakPlayCount": 100, 18 "peakBandwidthInBps": 100, 19 "downstreamInByte": 10000, 20 "playCount": 100 21 },{ 22 "date": "20160203", 23 "durationInMinute": 100, 24 "peakPlayCount": 100, 25 "peakBandwidthInBps": 100, 26 "downstreamInByte": 10000, 27 "playCount": 50 28 }... 29 ] 30} 31
统计实时播放人数和带宽
接口描述
查询app下所有stream的实时播放人数和实时带宽,数据源采集频率每分钟一次,可能会有几分钟延迟情况。
请求语法
1GET /v5/statistics/realtime/domain/{domain}/app/{app} HTTP/1.1
2accept-encoding: gzip, deflate
3x-bce-date: {utc-date-string}
4host: lss.bj.baidubce.com
5accept: */*
6connection: keep-alive
7x-bce-request-id: {bce-request-id}
8content-type: application/json
9authorization: {bce-authorization-string}
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必填 | 示例 |
---|---|---|---|---|
domain | String | 播放域名 | 是 | play.bcelive.com |
app | String | app名称 | 是 | live |
请求示例
1GET /v5/statistics/realtime/domain/play.bcelive.com/app/live HTTP/1.1
2content-length: 87
3accept-encoding: gzip, deflate
4x-bce-date: 2015-07-03T09:28:13Z
5connection: keep-alive
6accept: */*
7user-agent: python-requests/2.4.0 CPython/2.7.9 Darwin/14.3.0
8host: 10.105.97.172
9x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
10content-type: application/json
11authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
bandwidthInBps | Long | 实时带宽数据,单位Byte |
playCount | Long | 实时播放人数(每分钟下行带宽/上行码率) |
date | Date | 当前时间 |
stream | String | stream名称 |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7[
8 {
9 “bandwidthInBps”: 272,
10 “date”: “2017-02-20T11:11:32Z”,
11 “playCount”: 8,
12 “stream”: “stream1”
13 },
14 {
15 “bandwidthInBps”: 326874087,
16 “date”: “2017-02-20T11:11:32Z”,
17 “playCount”: 174,
18 “stream”: “stream2”
19 },
20 {
21 “bandwidthInBps”: 541274250,
22 “date”: “2017-02-20T11:11:32Z”,
23 “playCount”: 325,
24 “stream”: “stream3”
25 }
26]
特定domain上行流量
接口描述
查询多个domain(播放域名)的上行流量。
请求语法
1GET /v5/statistics/domain/{domain}/uptraffic?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-18T00%3a00%3a00Z&timeInterval=SHORT_TERM HTTP/1.1
2accept-encoding: gzip, deflate
3x-bce-date: {utc-date-string}
4host: 10.105.97.172
5accept: */*
6connection: keep-alive
7x-bce-request-id: {bce-request-id}
8content-type: application/json
9authorization: {bce-authorization-string}
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 是否必须 | 描述 | 可选值 | 默认值 |
---|---|---|---|---|---|
domain | String | 是 | 播放域名,多个域名以, 分割 |
- | - |
startTime | Date | 是 | 起始时间 | - | - |
endTime | Date | 是 | 结束时间 | - | - |
timeInterval | String | 是 | 时间间隔粒度 | LONG_TERM/MID_TERM/SHORT_TERM; LONG_TERM:天粒度;MID_TERM:小时粒度;SHORT_TERM:5min粒度 | - |
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
startTime | String | 统计数据起始时间 |
endTime | String | 统计数据截止时间 |
timeInterval | String | 时间间隔粒度;时间间隔粒度SHORT_TERM:五分钟平均带宽; MID_TERM:小时内的max五分钟平均带宽; LONG_TERM:一天内的max五分钟平均带宽。 |
statistics | Object | 统计数据数组 |
+timestamp | String | 数据时间点 |
+upstreamInByte | Number | 上行流量 |
响应示例:
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "startTime": "2016-01-01T00:00:00Z",
9 "endTime": "2016-01-01T10:00:00Z",
10 "timeInterval ": LONG_TERM,
11 "statistics":[
12 {
13 "timestamp": "2016-01-01T00:00:00Z",
14 "upstreamInByte": 100
15 },{
16 "timestamp": "2016-01-01T00:10:00Z",
17 "upstreamInByte": 0
18 },{
19 "timestamp": "2016-01-01T00:20:00Z",
20 "upstreamInByte": 150
21 }
22 ]
23}
所有domain上行流量
接口描述
查询所有播放域名上行流量。
请求语法
1GET /v5/statistics/domain/uptraffic?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-18T00%3a00%3a00Z&timeInterval=SHORT_TERM HTTP/1.1
2accept-encoding: gzip, deflate
3x-bce-date: {utc-date-string}
4host: 10.105.97.172
5accept: */*
6connection: keep-alive
7x-bce-request-id: {bce-request-id}
8content-type: application/json
9authorization: {bce-authorization-string}
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 是否必须 | 描述 | 可选值 | 默认值 |
---|---|---|---|---|---|
startTime | Date | 是 | 起始时间 | - | - |
endTime | Date | 是 | 结束时间 | - | - |
timeInterval | String | 是 | 时间间隔粒度 | LONG_TERM/MID_TERM/SHORT_TERM; LONG_TERM :天粒度;MID_TERM :小时粒度;SHORT_TERM :5min粒度 |
- |
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
domain | String | 播放域名 |
startTime | String | 统计数据起始时间 |
endTime | String | 统计数据截止时间 |
timeInterval | String | 时间间隔粒度;时间间隔粒度SHORT_TERM :五分钟平均带宽;MID_TERM :小时内的max五分钟平均带宽; LONG_TERM :一天内的max五分钟平均带宽。 |
statistics | Object | 统计数据数组 |
+timestamp | String | 数据时间点 |
+upstreamInByte | Number | 上行流量 |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "domain": "play.bcelive.com",
9 "startTime": "2016-01-01T00:00:00Z",
10 "endTime": "2016-01-01T10:00:00Z",
11 "timeInterval ": LONG_TERM,
12 "statistics":[
13 {
14 "timestamp": "2016-01-01T00:00:00Z",
15 "upstreamInByte": 100
16 },{
17 "timestamp": "2016-01-01T00:10:00Z",
18 "upstreamInByte": 0
19 },{
20 "timestamp": "2016-01-01T00:20:00Z",
21 "upstreamInByte": 150
22 }
23 ]
24}
特定domain上行带宽
接口描述
查询多个domain(播放域名)的上行带宽
请求语法
1GET /v5/statistics/domain/{domain}/upbandwidth?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-18T00%3a00%3a00Z&timeInterval=SHORT_TERM HTTP/1.1
2accept-encoding: gzip, deflate
3x-bce-date: {utc-date-string}
4host: 10.105.97.172
5accept: */*
6connection: keep-alive
7x-bce-request-id: {bce-request-id}
8content-type: application/json
9authorization: {bce-authorization-string}
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 是否必须 | 描述 | 可选值 | 默认值 |
---|---|---|---|---|---|
domain | String | 是 | 播放域名,多个域名以,分割 | - | - |
startTime | Date | 是 | 起始时间 | - | - |
endTime | Date | 是 | 结束时间 | - | - |
timeInterval | String | 是 | 时间间隔粒度 | LONG_TERM/MID_TERM/SHORT_TERM; LONG_TERM :天粒度;MID_TERM :小时粒度;SHORT_TERM :5min粒度 |
- |
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
domain | String | 播放域名 |
startTime | String | 统计数据起始时间 |
endTime | String | 统计数据截止时间 |
timeInterval | String | 时间间隔粒度;时间间隔粒度SHORT_TERM :五分钟平均带宽; MID_TERM :小时内的max五分钟平均带宽;LONG_TERM :一天内的max五分钟平均带宽。 |
statistics | Object | 统计数据数组 |
+timestamp | String | 数据时间点 |
+bandwidthInBps | Number | 上行带宽 |
响应示例:
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "domain": "play.bcelive.com",
9 "startTime": "2016-01-01T00:00:00Z",
10 "endTime": "2016-01-01T10:00:00Z",
11 "timeInterval ": LONG_TERM,
12 "statistics":[
13 {
14 "timestamp": "2016-01-01T00:00:00Z",
15 "bandwidthInBps": 100
16 },{
17 "timestamp": "2016-01-01T00:10:00Z",
18 "bandwidthInBps": 0
19 },{
20 "timestamp": "2016-01-01T00:20:00Z",
21 "bandwidthInBps": 150
22 }
23 ]
24}
所有domain上行带宽
接口描述
查询用户下所有domain的上行带宽
请求语法
1GET /v5/statistics/domain/upbandwidth?startTime=2016-01-18T00%3a00%3a00Z&endTime=2016-01-18T00%3a00%3a00Z&timeInterval=SHORT_TERM HTTP/1.1
2accept-encoding: gzip, deflate
3x-bce-date: {utc-date-string}
4host: 10.105.97.172
5accept: */*
6connection: keep-alive
7x-bce-request-id: {bce-request-id}
8content-type: application/json
9authorization: {bce-authorization-string}
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 是否必须 | 描述 | 可选值 | 默认值 |
---|---|---|---|---|---|
startTime | Date | 是 | 起始时间 | - | - |
endTime | Date | 是 | 结束时间 | - | - |
timeInterval | String | 是 | 时间间隔粒度 | LONG_TERM/MID_TERM/SHORT_TERM; LONG_TERM :天粒度; MID_TERM :小时粒度; SHORT_TERM :5min粒度 |
- |
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
domain | String | 播放域名 |
startTime | String | 统计数据起始时间 |
endTime | String | 统计数据截止时间 |
timeInterval | String | 时间间隔粒度;时间间隔粒度SHORT_TERM :五分钟平均带宽;MID_TERM :小时内的max五分钟平均带宽;LONG_TERM :一天内的max五分钟平均带宽。 |
statistics | Object | 统计数据数组 |
+timestamp | String | 数据时间点 |
+bandwidthInBps | Number | 上行带宽 |
响应示例
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Fri, 03 Jul 2015 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "domain": "play.bcelive.com",
9 "startTime": "2016-01-01T00:00:00Z",
10 "endTime": "2016-01-01T10:00:00Z",
11 "timeInterval ": LONG_TERM,
12 "statistics":[
13 {
14 "timestamp": "2016-01-01T00:00:00Z",
15 "bandwidthInBps": 100
16 },{
17 "timestamp": "2016-01-01T00:10:00Z",
18 "bandwidthInBps": 0
19 },{
20 "timestamp": "2016-01-01T00:20:00Z",
21 "bandwidthInBps": 150
22 }
23 ]
24}
查询录制路数
接口描述
查询特定Domain的录制路数/查询当前用户下所有Domain的总录制路数
查询特定Domain的录制路数
请求语法
1 GET /v<version>/statistics/table/domain/recordCount?domainType=<domainType>&domain=<domain>&startTime=<startTime>&endTime=<endTime>&timeInternal={LONG_TERM | MID_TERM | SHORT_TERM} HTTP/1.1
2 host: lss.bj.baidubce.com
3 content-type: application/json
4 authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
domainType | String | 域名类型,有'play" 和 "push"两种类型,分别对应按照 播放域名 和 推流域名 来查询录制路数 | 是 |
domain | String | 直播域名(查询用户级别时不填) ,若是查询多个域名,域名间以英文逗号分隔 | 否 |
startTime | String | 起始时间, UtcTime | 是 |
endTime | String | 结束时间, UtcTime | 是 |
timeInterval | enum | 时间间隔粒度 默认SHORT_TERM(5min) SHORT_TERM(每5分钟):5min内的录制路数峰值 MID_TERM(每小时):小时内Max 5min录制路数 LONG_TERM(每天): 一天内Max 5min录制路数 |
否 |
recordType | String | 查询录制文件类型,有效值:all,mp4,flv,hls 默认为"all",查询所有录制格式路数 |
否 |
allDomain | Boolean | 默认为false,表示查询特定domain的录制路数,为true表示查询用户级别录制路数 | 否 |
注:查询用户级别录制数据时,domain不填,allDomain为true
查询域名级别录制数据时,domain为对应查询域名,allDomain不填
请求示例
1GET /v5/statistics/table/domain/recordCount?domainType=play&domain=demo1.com&startTime=2021-08-13T01:00:00Z&endTime=2021-08-13T02:00:00Z&timeInternal=SHORT_TERM HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2021-08-13T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
startTime | String | 统计数据起始时间,UtcTime |
endTime | String | 统计数据截止时间,UtcTime |
domain | String | 直播域名 |
timeInterval | enum | SHORT_TERM(每5分钟), MID_TERM(每小时),LONG_TERM(每天) |
recordType | String | 查询录制文件类型 默认为all,表示查询所有类型 mp4: 查询mp4类型录制路数 flv: 查询 flv类型录制路数 hls : 查询hls类型录制路数 |
statistics | Object | 统计数据数组 |
+type | String | 录制文件类型(flv / mp4 / hls) |
+timestamp | String | 数据时间点 |
+count | Long | 录制路数 |
响应示例
- recordType值为all 表示查询所有录制类型
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Aug, 14 Jul 2021 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "startTime": "2021-08-13T01:00:00Z",
9 "endTime": "2021-08-13T01:05:00Z",
10 "timeInternal":"SHORT_TERM",
11 "domain":"demo1.com",
12 "recordType":"all"
13 "statistics":[
14 {
15 "type": "flv",
16 "timestamp":"2021-08-13T01:00:00Z",
17 "count": 60
18 },
19 {
20 "type": "mp4",
21 "timestamp":"2021-08-13T01:00:00Z",
22 "count": 60
23 },
24 {
25 "type": "hls",
26 "timestamp":"2021-08-13T01:00:00Z",
27 "count": 10
28 }
29 ]
30}
- recordType值为mp4/flv/hls 表示查询特定录制类型(这里以mp4为例)
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a2860966
3Date: Aug, 14 Jul 2021 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "startTime": "2021-08-13T01:00:00Z",
9 "endTime": "2021-08-13T01:05:00Z",
10 "timeInternal":"SHORT_TERM",
11 "domain":"demo1.com",
12 "recordType":"mp4"
13 "statistics":[
14 {
15 "timestamp":"2021-08-13T01:00:00Z",
16 "count": 60
17 }
18 ]
19}
查询用户下所有域名总录制路数
请求语法
1 GET /v<version>/statistics/table/domain/recordCount?domainType=<domainType>&allDomain=<allDomain>&startTime=<startTime>&endTime=<endTime>&timeInternal={LONG_TERM | MID_TERM | SHORT_TERM} HTTP/1.1
2 host: lss.bj.baidubce.com
3 content-type: application/json
4 authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
domainType | String | 域名类型,有'play" 和 "push"两种类型,分别对应按照 播放域名 和 推流域名 来查询录制路数 | 是 |
domain | String | 直播域名(查询用户级别时不填) ,若是查询多个域名,域名间以英文逗号分隔 | 否 |
startTime | String | 起始时间, UtcTime | 是 |
endTime | String | 结束时间, UtcTime | 是 |
timeInterval | enum | 时间间隔粒度 默认SHORT_TERM(5min) SHORT_TERM(每5分钟):5min内的录制路数峰值 MID_TERM(每小时):小时内Max 5min录制路数 LONG_TERM(每天): 一天内Max 5min录制路数 |
否 |
recordType | String | 查询录制文件类型,有效值:all,mp4,flv,hls 默认为"all",查询所有录制格式路数 |
否 |
allDomain | Boolean | 默认为false,表示查询特定domain的录制路数,为true表示查询用户级别录制路数 | 否 |
注:查询用户级别录制数据时,domain不填,allDomain为true
查询域名级别录制数据时,domain为对应查询域名,allDomain不填
请求示例
1GET /v5/statistics/table/domain/recordCount?domainType=play&allDomain=true&startTime=2021-08-13T01:00:00Z&endTime=2021-08-13T02:00:00Z&timeInternal=SHORT_TERM HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2021-08-13T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
startTime | String | 统计数据起始时间,UtcTime |
endTime | String | 统计数据截止时间,UtcTime |
domain | String | 直播域名 |
timeInterval | enum | SHORT_TERM(每5分钟), MID_TERM(每小时),LONG_TERM(每天) |
recordType | String | 查询录制文件类型 默认为all,表示查询所有类型 mp4: 查询mp4类型录制路数 flv: 查询 flv类型录制路数 hls : 查询hls类型录制路数 |
statistics | Object | 统计数据数组 |
+type | String | 录制文件类型(flv / mp4 / hls) |
+timestamp | String | 数据时间点 |
+count | Long | 录制路数 |
响应示例
- recordType值为all 表示查询所有录制类型
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
3Date: Aug, 14 Jul 2021 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "startTime": "2021-08-13T01:00:00Z",
9 "endTime": "2021-08-13T01:05:00Z",
10 "timeInternal":"SHORT_TERM",
11 "recordType":"all"
12 "statistics":[
13 {
14 "type": "flv",
15 "timestamp":"2021-08-13T01:00:00Z",
16 "count": 100
17 },
18 {
19 "type": "mp4",
20 "timestamp":"2021-08-13T01:00:00Z",
21 "count": 200
22 },
23 {
24 "type": "hls",
25 "timestamp":"2021-08-13T01:00:00Z",
26 "count": 55
27 }
28 ]
29}
- recordType值为mp4/flv/hls 表示查询特定录制类型(这里以mp4为例)
1HTTP/1.1 200 OK
2x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a2860966
3Date: Aug, 14 Jul 2021 09:28:13 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Cache-Control: no-cache
7{
8 "startTime": "2021-08-13T01:00:00Z",
9 "endTime": "2021-08-13T01:05:00Z",
10 "timeInternal":"SHORT_TERM",
11 "recordType":"mp4"
12 "statistics":[
13 {
14 "timestamp":"2021-08-13T01:00:00Z",
15 "count": 200
16 }
17 ]
18}
转推带宽数据
接口描述
查询用户级别或者域名级别的转推(LSS推三方)带宽数据。
请求语法
1 GET /v<version>/statistics/table/domain/forwardBandwidth?domain=<domain>&allDomain=<allDomain>&startTime=<startTime>&endTime=<endTime>&timeInternal={LONG_TERM | MID_TERM | SHORT_TERM} HTTP/1.1
2 host: lss.bj.baidubce.com
3 content-type: application/json
4 authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
startTime | String | 起始时间,UtcTime | 是 |
endTime | String | 结束时间,UtcTime | 是 |
domain | String | 推流域名(查询用户级别时不填) ,若是查询多个域名,域名间以英文逗号分隔 | 否 |
timeInterval | enum | 时间间隔粒度 默认SHORT_TERM (5min) SHORT_TERM (每5分钟)、 MID_TERM (每小时)、LONG_TERM (每天) |
否 |
allDomain | Boolean | 默认为false,表示查询特定domain的转推带宽,为true表示查询用户级别转推带宽 | 否 |
注:查询用户级别转推带宽数据时,domain不填,allDomain为true
查询域名级别转推带宽数据时,domain为对应查询域名,allDomain不填
请求示例
1GET /v5/statistics/table/domain/forwardBandwidth?startTime=2022-05-27T05:00:00Z&endTime=2022-05-27T05:30:01Z&timeInterval=SHORT_TERM&domain=push.xxx.com HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4Authorization: bce-auth-v1/7dbfa52b34a24282ac026e49f96987d3/2022-05-27T07:30:53Z/1800/host/****
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
startTime | String | 统计数据起始时间,UtcTime |
endTime | String | 统计数据截止时间,UtcTime |
timeInterval | enum | SHORT_TERM (每5分钟), MID_TERM (每小时),LONG_TERM (每天) |
statistics | List | 统计数据数组 |
+timestamp | String | 数据时间点 |
+bandwidthInBps | Long | 平均带宽,单位:bps (bit per second) |
响应示例
1HTTP/1.1 200 OK
2Cache-Control: no-cache
3Content-Type: application/json;charset=UTF-8
4Date: Fri, 27 May 2022 07:30:53 GMT
5X-Bce-Request-Id: 9eba0ee3-c419-43ee-bf8f-e802c929987e
6Transfer-Encoding: chunked
7
8{
9 "startTime": "2022-05-27T05:00:00Z",
10 "endTime": "2022-05-27T05:30:00Z",
11 "allDomain": false,
12 "statistics": [
13 {
14 "timestamp": "2022-05-27T05:00:00Z",
15 "bandwidthInBps": 35559471999
16 },
17 {
18 "timestamp": "2022-05-27T05:05:00Z",
19 "bandwidthInBps": 35986738623
20 },
21 {
22 "timestamp": "2022-05-27T05:10:00Z",
23 "bandwidthInBps": 36271014665
24 },
25 {
26 "timestamp": "2022-05-27T05:15:00Z",
27 "bandwidthInBps": 36696126181
28 },
29 {
30 "timestamp": "2022-05-27T05:20:00Z",
31 "bandwidthInBps": 37144444535
32 },
33 {
34 "timestamp": "2022-05-27T05:25:00Z",
35 "bandwidthInBps": 37546103252
36 }
37 ],
38 "timeInterval": "SHORT_TERM"
39}
上行推流带宽数据
接口描述
查询用户级别或者域名级别的上行推流(用户推LSS)带宽数据。
请求语法
1 GET /v<version>/statistics/table/domain/publishBandwidth?domain=<domain>&allDomain=<allDomain>&startTime=<startTime>&endTime=<endTime>&timeInternal={LONG_TERM | MID_TERM | SHORT_TERM} HTTP/1.1
2 host: lss.bj.baidubce.com
3 content-type: application/json
4 authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
startTime | String | 起始时间,UtcTime | 是 |
endTime | String | 结束时间,UtcTime | 是 |
domain | String | 推流域名(查询用户级别时不填) ,若是查询多个域名,域名间以英文逗号分隔 | 否 |
timeInterval | enum | 时间间隔粒度 默认SHORT_TERM (5min) SHORT_TERM (每5分钟)、 MID_TERM (每小时)、LONG_TERM (每天) |
否 |
allDomain | Boolean | 默认为false,表示查询特定domain的推流带宽,为true表示查询用户级别推流带宽 | 否 |
注:查询用户级别上行推流带宽数据时,domain不填,allDomain为true
查询域名级别上行推流带宽数据时,domain为对应查询域名,allDomain不填
请求示例
1GET /v5/statistics/table/domain/publishBandwidth?startTime=2022-05-27T05:00:00Z&endTime=2022-05-27T05:30:01Z&timeInterval=SHORT_TERM&domain=push.xxx.com HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4Authorization: bce-auth-v1/7dbfa52b34a24282ac026e49f96987d3/2022-05-27T07:30:53Z/1800/host/****
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
startTime | String | 统计数据起始时间,UtcTime |
endTime | String | 统计数据截止时间,UtcTime |
timeInterval | enum | SHORT_TERM (每5分钟), MID_TERM (每小时),LONG_TERM (每天) |
statistics | List | 统计数据数组 |
+timestamp | String | 数据时间点 |
+bandwidthInBps | Long | 平均带宽,单位:bps (bit per second) |
响应示例
1HTTP/1.1 200 OK
2Cache-Control: no-cache
3Content-Type: application/json;charset=UTF-8
4Date: Fri, 27 May 2022 07:30:53 GMT
5X-Bce-Request-Id: b4316e96-931e-44ad-b601-03031aae9037
6Transfer-Encoding: chunked
7
8{
9 "startTime": "2022-05-27T05:00:00Z",
10 "endTime": "2022-05-27T05:30:00Z",
11 "statistics": [
12 {
13 "timestamp": "2022-05-27T05:00:00Z",
14 "bandwidthInBps": 0
15 },
16 {
17 "timestamp": "2022-05-27T05:05:00Z",
18 "bandwidthInBps": 0
19 },
20 {
21 "timestamp": "2022-05-27T05:10:00Z",
22 "bandwidthInBps": 0
23 },
24 {
25 "timestamp": "2022-05-27T05:15:00Z",
26 "bandwidthInBps": 26054856445
27 },
28 {
29 "timestamp": "2022-05-27T05:20:00Z",
30 "bandwidthInBps": 32903641589
31 },
32 {
33 "timestamp": "2022-05-27T05:25:00Z",
34 "bandwidthInBps": 33260493588
35 }
36 ],
37 "timeInterval": "SHORT_TERM"
38}
低延迟直播带宽数据
接口描述
查询用户级别或者域名级别的低延迟带宽数据。
请求语法
1 GET /v<version>/statistics/rtc/domain/bandwidth?domain=<domain>&allDomain=<allDomain>&startTime=<startTime>&endTime=<endTime>&timeInternal={LONG_TERM | MID_TERM | SHORT_TERM} HTTP/1.1
2 host: lss.bj.baidubce.com
3 content-type: application/json
4 authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
startTime | String | 起始时间,UtcTime | 是 |
endTime | String | 结束时间,UtcTime | 是 |
domain | String | 直播域名(查询用户级别时不填) ,若是查询多个域名,域名间以英文逗号分隔 | 否 |
timeInterval | enum | 时间间隔粒度 默认SHORT_TERM (5min) SHORT_TERM (每5分钟)、 MID_TERM (每小时)、LONG_TERM (每天) |
否 |
allDomain | Boolean | 默认为false,表示查询特定domain的低延迟带宽数据,为true表示查询用户级别低延迟带宽数据 | 否 |
注:查询用户级别低延迟带宽数据时,domain不填,allDomain为true
查询域名级别低延迟带宽数据时,domain为对应查询域名,allDomain不填
请求示例
1GET /v5/statistics/rtc/domain/bandwidth?startTime=2022-05-27T05:00:00Z&endTime=2022-05-27T05:30:01Z&timeInterval=SHORT_TERM&domain=play.xxx.com HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4Authorization: bce-auth-v1/7dbfa52b34a24282ac026e49f96987d3/2022-05-27T07:30:53Z/1800/host/****
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
startTime | String | 统计数据起始时间,UtcTime |
endTime | String | 统计数据截止时间,UtcTime |
timeInterval | enum | SHORT_TERM (每5分钟), MID_TERM (每小时),LONG_TERM (每天) |
statistics | List | 统计数据数组 |
+timestamp | String | 数据时间点 |
+bandwidthInBps | Long | 平均带宽,单位:bps (bit per second) |
响应示例
1HTTP/1.1 200 OK
2Cache-Control: no-cache
3Content-Type: application/json;charset=UTF-8
4Date: Fri, 27 May 2022 07:30:53 GMT
5X-Bce-Request-Id: 9eba0ee3-c419-43ee-bf8f-e802c929987e
6Transfer-Encoding: chunked
7
8{
9 "startTime": "2022-05-27T05:00:00Z",
10 "endTime": "2022-05-27T05:30:00Z",
11 "allDomain": false,
12 "statistics": [
13 {
14 "timestamp": "2022-05-27T05:00:00Z",
15 "bandwidthInBps": 35559471999
16 },
17 {
18 "timestamp": "2022-05-27T05:05:00Z",
19 "bandwidthInBps": 35986738623
20 },
21 {
22 "timestamp": "2022-05-27T05:10:00Z",
23 "bandwidthInBps": 36271014665
24 },
25 {
26 "timestamp": "2022-05-27T05:15:00Z",
27 "bandwidthInBps": 36696126181
28 },
29 {
30 "timestamp": "2022-05-27T05:20:00Z",
31 "bandwidthInBps": 37144444535
32 },
33 {
34 "timestamp": "2022-05-27T05:25:00Z",
35 "bandwidthInBps": 37546103252
36 }
37 ],
38 "timeInterval": "SHORT_TERM"
39}
低延迟直播流量数据
接口描述
查询用户级别或者域名级别的低延迟流量数据。
请求语法
1 GET /v<version>/statistics/rtc/domain/traffic?domain=<domain>&allDomain=<allDomain>&startTime=<startTime>&endTime=<endTime>&timeInternal={LONG_TERM | MID_TERM | SHORT_TERM} HTTP/1.1
2 host: lss.bj.baidubce.com
3 content-type: application/json
4 authorization: <bce-authorization-string>
请求头域
无特殊请求头域。
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
startTime | String | 起始时间,UtcTime | 是 |
endTime | String | 结束时间,UtcTime | 是 |
domain | String | 直播域名(查询用户级别时不填) ,若是查询多个域名,域名间以英文逗号分隔 | 否 |
timeInterval | enum | 时间间隔粒度 默认SHORT_TERM (5min) SHORT_TERM (每5分钟)、 MID_TERM (每小时)、LONG_TERM (每天) |
否 |
allDomain | Boolean | 默认为false,表示查询特定domain的低延迟流量数据,为true表示查询用户级别低延迟流量数据 | 否 |
注:查询用户级别低延迟流量数据时,domain不填,allDomain为true
查询域名级别低延迟流量数据时,domain为对应查询域名,allDomain不填
请求示例
1GET /v5/statistics/rtc/domain/traffic?startTime=2022-05-27T05:00:00Z&endTime=2022-05-27T05:30:01Z&timeInterval=SHORT_TERM&domain=play.xxx.com HTTP/1.1
2host: lss.bj.baidubce.com
3content-type: application/json
4Authorization: bce-auth-v1/7dbfa52b34a24282ac026e49f96987d3/2022-05-27T07:30:53Z/1800/host/****
响应头域
无特殊响应头域。
响应参数
参数 | 类型 | 描述 |
---|---|---|
startTime | String | 统计数据起始时间,UtcTime |
endTime | String | 统计数据截止时间,UtcTime |
timeInterval | enum | SHORT_TERM (每5分钟), MID_TERM (每小时),LONG_TERM (每天) |
statistics | List | 统计数据数组 |
+timestamp | String | 数据时间点 |
+downstreamInByte | Long | 流量,单位:byte |
响应示例
1HTTP/1.1 200 OK
2Cache-Control: no-cache
3Content-Type: application/json;charset=UTF-8
4Date: Fri, 27 May 2022 07:30:53 GMT
5X-Bce-Request-Id: 9eba0ee3-c419-43ee-bf8f-e802c929987e
6Transfer-Encoding: chunked
7
8{
9 "startTime": "2022-05-27T05:00:00Z",
10 "endTime": "2022-05-27T05:30:00Z",
11 "allDomain": false,
12 "statistics": [
13 {
14 "timestamp": "2022-05-27T05:00:00Z",
15 "downstreamInByte": 35559471999
16 },
17 {
18 "timestamp": "2022-05-27T05:05:00Z",
19 "downstreamInByte": 35986738623
20 },
21 {
22 "timestamp": "2022-05-27T05:10:00Z",
23 "downstreamInByte": 36271014665
24 },
25 {
26 "timestamp": "2022-05-27T05:15:00Z",
27 "downstreamInByte": 36696126181
28 },
29 {
30 "timestamp": "2022-05-27T05:20:00Z",
31 "downstreamInByte": 37144444535
32 },
33 {
34 "timestamp": "2022-05-27T05:25:00Z",
35 "downstreamInByte": 37546103252
36 }
37 ],
38 "timeInterval": "SHORT_TERM"
39}