Report
Get a listing of your traffic and bandwidth usage.
Details
GEThttps://api.cdn77.com/v2.0/report/details
Get the costs and bandwidth consumption for your traffic statistics.
Parameters
Parameter | Example | Description |
---|---|---|
login string* | info@domain.com | Your login (email) to CDN77 control panel |
passwd string* | 8vL4BpXbRqgPTKA0h | Your API password. |
type string* | bandwidth | Valid values: 'bandwidth' | 'costs' | 'headers' | 'hit-miss' | 'traffic' |
from int* | 1398139200 for 22-04-2014. | timestamp |
to int* | 1398139200 for 22-04-2014. | timestamp |
cdn_ids array | List of ids of CDN Resources. See how to retrieve list of CDN Resources. |
Return Values
Return Value | Description |
---|---|
unit | USD (for costs) | B (for traffic) | bps (for bandwidth) |
data |
Contains another objects - its identificators are cdn ids and has following params: EU (Europe), SA (South America), NA (North America), AS (Asia), AU (Australia), AF (Africa). Each param contains float value. Example of report object:{ "report": { "unit": "USD", "data": { "myCdnId": { "EU": 50.5, "SA": 0, "NA": 40.08, "AS": 0, "AU": 0, "AF": 0 } } } } |
Examples
// GET request
curl -g "https://api.cdn77.com/v2.0/report/details?login=name@domain.com&passwd=your_api_password&type=bandwidth&from=1398139200&to=1399139200&cdn_ids[]=xxx"
// response
{
"status": "ok",
"description": "Request was successful.",
"report": {
"unit": "bps",
"data": {
"xxx": {
"NA": 114.22,
"EU": 242.26,
"AS": 81.89,
"SA": 3.02,
"AU": 5.87,
"AF": 0
}
}
}
}