curl -i -X GET -u username:password -H 'Accept: application/json' -H 'Content-type: application/json' --url 'https://cdnsun.com/api/cdns/[ID]/live-reports?type=MBPS&period=1h'
|Option||Data Type||Description||Example||Known Values||Note|
|ID||integer||Specify the CDN service ID for live reports.||5|
|period||string||Specify the time period for live reports.||1h||1h, 2h, 4h, 12h, 24h, 48h||It is a mandatory option when start and end options are not set.|
|start||string||Specify the start time for live reports.||2014-01-15T01:23:00+01:00|
|end||string||Specify the end time for live reports.||2014-01-19T14:56:00+01:00|
|type*||string||Specify the type of live reports.||MBPS||MBPS, GB, CONCURRENT_VIEWERS||Please note that the type CONCURRENT_VIEWERS is for streaming CDN services (Video, Video Push and Live) only.|
|location_ids||array||Filter live reports by indicated CDN location integer ID(s).||[1, 2]||Example query string: ?location_ids=1&location_ids=2|
|cdn_ids||array||Filter live reports by indicated CDN service integer ID(s).||[1, 2]||Example query string: ?cdn_ids=1|
Please note that for wide time frames live reports are automatically aggregated. Reports of type CONCURRENT_VIEWERS represent an average number of concurrent viewers in 5 minutes intervals.
Example 1: There are 2 viewers between 14:00 and 14:05. The CONCURRENT_VIEWERS value at 14:05 will be (5/5)*2 = 2, where 5 corresponds to 5 minutes.
Example 2: The first viewer from the Example 1 left at 14:02. The CONCURRENT_VIEWERS value at 14:05 will be (2/5)*1 + (5/5)*1 = 1.4.
Example 3: The first viewer from the Example 1 left at 14:02 and the second viewer left at 14:03. The CONCURRENT_VIEWERS value at 14:05 will be (2/5)*1 + (3/5)*1 = 1
The stat_time property of reports is in the ISO 8601 (with timezone) format. To change your timezone please visit the Billing/Settings section.
When you set start and end options then the period option is not needed and it is ignored. The start and end options are expected to be in the ISO 8601 format in your timezone. To change your timezone please visit the Billing/Settings section. Please note that reports of type GB and CONCURRENT_VIEWERS are kept for 31 days and reports of type MBPS are kept for 10 days.