Get the total number of broadcaster and viewer minutes for all Live Stream Acceleration domains of a particular service type by region. Service-type should be one of the services you subscribe to: live-push, live-pull, or live-hls. Refer to the mapping of these service types to QUANTIL's products. You can specify multiple service types by separating them with semicolons. The region can be 'cn' representing 'Mainland China', 'nc' representing 'Near China', 'euna' representing 'Europe and North America' , 'apac' representing 'Asia Pacific', 'am' representing North and South America, or 'emea' representing 'Europe, Middle East, and Africa'. You may specify more than one area by separating them with semicolons. Request parameters allow you to specify a time period, an interval type, and timezone for the output. The minutes data is derived from the concurrency data. If the interval type is oneminute, the minute data is the same as the concurrency data. If the interval type is fiveminutes, the minute data is the sum of 1 minute data within the 5 minute period. For example, from 10:00:00 to 10:05:00, if the minute data of broadcaster and viewer per minute is 2 minutes, the minute data of 5 minutes is 10 minutes.
Header |
Description |
Required |
Authorization |
Authorization string for the request |
Yes |
Host |
URI for the QUANTIL SDK (i.e., api.quantil.com) |
Yes |
Date |
The date and time of the request. |
Yes |
Accept |
Indicates the accepted format (i.e., application/xml) |
Yes |
Parameter |
Description |
Required |
datefrom |
RFC3339 formatted date indicating the starting date. Example: 2013-01-01T22:30:00+08:00 |
Yes |
dateto |
RFC3339 formatted date indicating the ending date. Example: 2013-01-01T22:30:00+08:00 |
Yes |
type |
Indicates the granularity of time. It can be oneminute, fiveminutes, hourly, daily, or monthly. |
Yes |
timezone |
Indicates the timezone for the report data. It must be relative to GMT and specified in the format GMT+n where -12<= n <= 12. For example, timezone=GMT-7 and timezone=GMT+8. If the parameter is unspecified, results will be in the GMT timezone. |
No |
This request does not include an XML document in the request body.
GET /api/report/{service-type}/live-minutes/{region} HTTP/1.1
Authorization: <authorization string>
Host: api.quantil.com
Date: <date>
Accept: application/xml
Here is the structure of a request using the curl utility.
curl -i --url https://api.quantil.com/api/report/ {service-type} /live-minutes/{region} ? datefrom = {date from} & dateto = {date to} & type = {fiveminutes or Hourly or daily} & timezone = {timezone}
-X GET
-u {user}: {password}
-H 'Date: Fri, 26 Oct 2012 06:33:26 GMT'
-H 'Accept: application/xml'
curl -i --url 'https://api.quantil.com/api/report/live-push/live-minutes/apac?datefrom=2014-08-01T00:00:00%2B09:00&dateto=2014-08-02T23:59:59%2B09:00&type=fiveminutes' -u test:amn9BXnyZtq7jyVQZjBls0OBZk4= -H 'Date: Thu, 07 Aug 2014 14:31:12 PDT' -H 'Accept: application/xml'
HTTP/1.1 200 OK
Date: <date>
Content-Type: application/xml; charset = utf-8
x-cnc-request-id: {id string auto generated by the QUANTIL server}
Element |
Description |
live-minutes-report |
container for broadcaster and viewer minutes information. It will contain zero or more <live-minutes-data> child elements indicating the broadcaster and viewer minutes at different times. |
live-minutes-data |
this container object contains a <timestamp> element and a <live-minutes> describing the minutes at a particular time. |
timestamp |
indicates the date and time |
live-minutes |
indicates the total number of broadcaster and viewer during the requested time period. |
The following example shows data at one minute intervals.
HTTP/1.1 200 OK
Date: Thu, 07 Aug 2014 20:51:27 GMT
Accept-Ranges: bytes
Server: WS-web-server
x-cnc-request-id: 1129283
ContentType: application/xml;charset=UTF-8
Content-Type: application/xml;charset=UTF-8
Content-Length: 537
<live-minutes-report>
<live-minutes-data>
<timestamp>2014-07-31 23:00:00</timestamp>
<live-minutes>100</live-minutes>
</live-minutes-data>
<live-minutes-data>
<timestamp>2014-07-31 23:01:00</timestamp>
<live-minutes>110</live-minutes>
</live-minutes-data>
<live-minutes-data>
<timestamp>2014-07-31 23:02:00</timestamp>
<live-minutes>120</live-minutes>
</live-minutes-data>
<live-minutes-data>
<timestamp>2014-07-31 23:03:00</timestamp>
<live-minutes>130</live-minutes>
</live-minutes-data>
</live-minutes-report>
Error |
Description |
HTTP status code |
InvalidDatePeriod |
The date specified is invalid. |
400 |
InvalidReportType |
The report type specified is invalid. |
400 |
InvalidServiceArea |
The region specified is invalid. |
400 |
InvalidServiceType |
The service type specified is invalid. |
400 |
InvalidTimeSpan |
The time span exceeds the limit |
400 |