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
| 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, 7d, 14d | 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, CODES | |
| 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 |
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.