Get CDN service reports
curl -i -X GET -u username:password -H 'Accept: application/json' -H 'Content-type: application/json' --url 'https://cdnsun.com/api/cdns/[ID]/reports?type=GB&period=24h'
|Option||Data Type||Description||Example||Known Values||Note|
|ID||integer||Specify the CDN service ID for reports.||5|
|period||string||Specify the time period for reports.||24h||4h, 6h, 8h, 12h, 24h, 48h, 7d, 14d, 1m, today, yesterday, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12||It is a mandatory option when start and end options are not set.|
|start||string||Specify the start time for reports.||2014-01-15T01:00:00+01:00|
|end||string||Specify the end time for reports.||2014-01-19T14:00:00+01:00|
|type*||string||Specify the type of reports.||GB||GB, MBPS, COSTS|
|detailed_on||integer||Enable or disable detailed (per location) reports format.||0||0, 1|
Please note that the stat_time property of reports represents the following:
- For periods 4h, 6h, 8h, 12h, 24h, 48h, today and yesterday it represents the hour for which the reports have been generated. In this case the stat_time property is in the ISO 8601 (with timezone) format. Stat_time 2012-04-15T17:00:00+02:00 represents the time frame between 2012-04-15T17:00:00+02:00 and 2012-04-15T17:59:59+02:00. To change your timezone please visit the Billing/Settings section.
- For periods 7d, 14d, 1m and 1-12 (past months) it represents the day for which the reports have been generated. In this case the stat_time property is in the YYYY-MM-DD format (in your timezone). Stat_time 2012-04-15 represents the time frame between 2012-04-15T00:00:00 and 2012-04-15T23:59:59. 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 and the reports are in the hourly (ISO 8601) format in your timezone as well as 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 the maximal allowed time frame between start and end options is set to 31 days and that reports are kept for 365 days.