Get Top Referrers Report

This report is available only for resource owner.

To get the Top 50 referrers report, use the following request:

GET /cdn/reports/top_referrers.xml
GET /cdn/reports/top_referrers.json

XML Request Example

curl -i -X GET -u user:userpass --url http://onapp.test/cdn/reports/top_referrers.xml -d '<top_referrers><start_date>2016-11-09</start_date><end_date>2016-11-10</end_date><entity_id>945986057</entity_id></top_referrers>' -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/top_referrers.json  -d '{"top_referrers": {"start_date": "2016-11-09", "end_date": "2016-11-10", "entity_id": "945986057"}}' -H 'Accept: application/json' -H 'Content-type: application/json'

Where:

Define a time period by setting the following parameters:

  • start_date - the start date of the specific time period
  • end_date - the end date of the specific time period

Get statistics for a particular CDN resource by setting the following parameters:

  • entity_id - the ID of the CDN resource

XML Output Example

<top_referrers>
<top_fifty_referrers_table type="array">
<top_fifty_referrers_table>
<resourceId type="integer">422564898</resourceId>
<referrer>/test.gif</referrer>
<hit type="float">110.0</hit>
</top_fifty_referrers_table>
</top_fifty_referrers_table>
</top_referrers>

Where:

resourceId - the ID of the CDN resource

referrer -  the referrer link

hit - the amount of references for the selected period