Get CDN service live reports

URL

https://cdnsun.com/api/cdns/[ID]/live-reports

Method

GET

Curl example

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'

Options

OptionData TypeDescriptionExampleKnown ValuesNote
IDintegerSpecify the CDN service ID for live reports.5  
periodstringSpecify the time period for live reports.1h1h, 2h, 4h, 12h, 24h, 48h, 7d, 14dIt is a mandatory option when start and end options are not set.
startstringSpecify the start time for live reports.2014-01-15T01:23:00+01:00  
endstringSpecify the end time for live reports.2014-01-19T14:56:00+01:00  
type*stringSpecify the type of live reports.MBPSMBPS, GB, CONCURRENT_VIEWERS, CODESPlease note that the type CONCURRENT_VIEWERS is for streaming CDN services (Video, Video Push and Live) only.
location_idsarrayFilter live reports by indicated CDN location integer ID(s).[1, 2] Example query string: ?location_ids[]=1&location_ids[]=2
cdn_idsarrayFilter live reports by indicated CDN service integer ID(s).[1, 2] Example query string: ?cdn_ids[]=1

Note

The stat_time property of the live 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 live reports are kept for the last 14 days. Please refer to CDN Usage Reports for more details.

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

Contact Us

  _____     _____     ____    
 / ____||  |  ___||  |  _ \\  
/ //---`'  | ||__    | |_| || 
\ \\___    | ||__    | .  //  
 \_____||  |_____||  |_|\_\\  
  `----`   `-----`   `-` --`