Get Admin Report
You can get separate reports for every table of the admin report:
- top 50 CDN resources
- locations
- top 50 HTTP errors (for a specific CDN resource and/or specific location)
To get the full Admin report, use the following request:
GET /cdn/reports/admin.xml
GET /cdn/reports/admin.json
XML Request Example
curl -i -X GET -u user:userpass --url http://onapp.test/cdn/reports/admin.xml -d '<admin><frequency>2</frequency><start_date>2016-11-09</start_date><end_date>2016-11-10</end_date></admin>' -H 'Accept: application/xml' -H 'Content-type: application/xml'
JSON Request Example
curl -i -X GET -u user:userpass --url http://onapp.test/cdn/reports/admin.json -d '{"admin": {"frequency":"2","start_date": "2016-11-09", "end_date": "2016-11-10"}}' -H 'Accept: application/json' -H 'Content-type: application/json'
Where:
Define statistics filters using the following parameters:
- frequency - set statistics frequency using the following values: 0- one minute, 1- one hour or 2- one day.
- start_date - the start date of the specific time period
- end_date - the end date of the specific time period
XML Output Example
<admin> <cache_statistic_admin_line_chart type="array"> <cache_statistic_admin_line_chart> <time>2016-12-09</time> <cached type="float">533803623.0</cached> <uncached type="float">112393003.0</uncached> <hit type="float">0.0</hit> <miss type="float">0.0</miss> <gb type="float">0.0</gb> </cache_statistic_admin_line_chart> <top_five_resources_admin_table type="array"> <top_five_resources_admin_table> <resourceId type="integer">798150172</resourceId> <pastHour type="float">0.0</pastHour> <currentHour type="float">0.0</currentHour> <bandwidth type="float">27423031805.0</bandwidth> </top_five_resources_admin_table> <top_five_locations_admin type="array"> <top_five_locations_admin> <locationId type="integer">189649337</locationId> <operatorId type="integer">0</operatorId> <bandwidth type="float">27423031805.0</bandwidth> </top_five_locations_admin> <top_five_http_error_codes_admin_table type="array"> <top_five_http_error_codes_admin_table> <resourceId type="integer">798150172</resourceId> <errorRequest type="float">5232828.0</errorRequest> </top_five_http_error_codes_admin_table> </admin>
Where:
cache_statistic_admin_line_chart - an array of cache statistics chart details:
time - the selected time period
cached - the amount of cached bandwidth
uncached - the amount of uncached bandwidth
hit - the amount of successful file requests for the selected period
miss - the amount of failed file requests for the selected period
gb - the amount of transmitted bandwidth for the selected period
top_five_resources_admin_table - an array of top five CDN resources table details:
resourceId - the ID of CDN resource
pastHour - the amount of bandwidth for the past hour
currentHour - the amount of bandwidth for this hour
bandwidth - the amount of transmitted bandwidth
top_five_locations_admin - an array of top five locations table details:
locationId - the ID of the location
operatorId - the ID of the operator
bandwidth - the amount of transmitted bandwidth
top_five_http_error_codes_admin_table - an array of top five error codes table details:
resourceId - the ID of CDN resource
errorRequest - the amount of error requests
Top 50 CDN resources
To get the top 50 CDN resources report, use the following request:
GET /cdn/reports/admin/top_50_cdn_resources.xml
GET /cdn/reports/admin/top_50_cdn_resources.json
XML Request Example
curl -i -X GET -u user:userpass --url http://onapp.test/cdn/reports/admin/top_50_cdn_resources.xml -d '<admin><start_date>2016-11-09</start_date><end_date>2016-11-10</end_date></admin>' -H 'Accept: application/xml' -H 'Content-type: application/xml'
JSON Request Example
curl -i -X GET -u user:userpass --url http://onapp.test/cdn/reports/admin/top_50_cdn_resources.json -d '{"admin": {"start_date": "2016-11-09", "end_date": "2016-11-10"}}' -H 'Accept: application/json' -H 'Content-type: application/json'
Where:
Define statistics filters using the following parameters:
- start_date - the start date of the specific time period
- end_date - the end date of the specific time period
XML Output Example
<top_50_cdn_resources> <top_fifty_resources_admin_table type="array"> <top_fifty_resources_admin_table> <resourceId type="integer">798150172</resourceId> <pastHour type="float">0.0</pastHour> <currentHour type="float">0.0</currentHour> <bandwidth type="float">27423031805.0</bandwidth> </top_fifty_resources_admin_table> </top_50_cdn_resources>
Where:
resourceId - the ID of CDN resource
pastHour - the amount of bandwidth for the past hour
currentHour - the amount of bandwidth for this hour
bandwidth - the amount of transmitted bandwidth
Locations
To get the locations report, use the following request:
GET /cdn/reports/admin/locations.xml
GET /cdn/reports/admin/locations.json
XML Request Example
curl -i -X GET -u user:userpass --url http://onapp.test/cdn/reports/admin/locations.xml -d '<admin><start_date>2016-11-09</start_date><end_date>2016-11-10</end_date></admin>' -H 'Accept: application/xml' -H 'Content-type: application/xml'
JSON Request Example
curl -i -X GET -u user:userpass --url http://onapp.test/cdn/reports/admin/locations.json -d '{"admin": {"start_date": "2016-11-09", "end_date": "2016-11-10"}}' -H 'Accept: application/json' -H 'Content-type: application/json'
Where:
Define statistics filters using the following parameters:
- start_date - the start date of the specific time period
- end_date - the end date of the specific time period
XML Output Example
<locations> <location_admin_table type="array"> <location_admin_table> <locationId type="integer">189649337</locationId> <operatorId type="integer">0</operatorId> <bandwidth type="float">27423031805.0</bandwidth> </location_admin_table> </locations>
Where:
locationId - the ID of the location
operatorId - the ID of the operator
bandwidth - the amount of transmitted bandwidth
Top 50 HTTP errors
To get the top 50 HTTP errors report, use the following request:
GET /cdn/reports/admin/top_50_http_errors.xml
GET /cdn/reports/admin/top_50_http_errors.json
XML Request Example
curl -i -X GET -u user:userpass --url http://onapp.test/cdn/reports/admin/top_50_http_errors.xml -d '<admin><start_date>2016-11-09</start_date><end_date>2016-11-10</end_date></admin>' -H 'Accept: application/xml' -H 'Content-type: application/xml'
JSON Request Example
curl -i -X GET -u user:userpass --url http://onapp.test/cdn/reports/admin/top_50_http_errors.json -d '{"admin": {"start_date": "2016-11-09", "end_date": "2016-11-10"}}' -H 'Accept: application/json' -H 'Content-type: application/json'
Where:
Define statistics filters using the following parameters:
- start_date - the start date of the specific time period
- end_date - the end date of the specific time period
location_id - the ID of the location
XML Output Example
<top_50_http_errors> <top_fifty_http_error_codes_admin_table type="array"> <top_fifty_http_error_codes_admin_table> <resourceId type="integer">798150172</resourceId> <errorRequest type="float">5232828.0</errorRequest> </top_fifty_http_error_codes_admin_table> </top_50_http_errors>
Where:
resourceId - the ID of CDN resource
errorRequest - the amount of error requests
entity_id - set CDN resource ID