Child pages
  • View CDN Resource Billing Statistics
Skip to end of metadata
Go to start of metadata

To view billing statistics for a resource:

GET /cdn_resources/:id/billing.xml
GET /cdn_resources/:id/billing.json

You can also define a shorter period by setting Start and End date (set use_local_time to 1 to use local time):

GET /cdn_resources/:id/billing.xml?period[startdate]=YYYY-MM-DD+hh:mm:ss&period[enddate]=YYYY-MM-DD+hh:mm:ss&period[use_local_time]=1
GET /cdn_resources/:id/billing.json?period[startdate]=YYYY-MM-DD+hh:mm:ss&period[enddate]=YYYY-MM-DD+hh:mm:ss&period[use_local_time]=1

XML Output example:

HTTP/1.1 200 OK
Date: Thu, 01 Nov 2012 08:46:57 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.9
X-UA-Compatible: IE=Edge,chrome=1
ETag: "5639dcb4af97cc6b5614f0e7102414a6"
Cache-Control: must-revalidate, private, max-age=0
X-Request-Id: b4aa84f305441fa8e791a2b597ed0c8e
X-Runtime: 0.064716
X-Rack-Cache: miss
Set-Cookie: _session_id=e01cb0aac4fc66becbd5bb294966d12e; path=/; HttpOnly
Status: 200
Connection: close
Transfer-Encoding: chunked
Content-Type: application/xml; charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<user_hourly_stats type="array">
  <user_hourly_stat>
    <cost type="float">1.51980002556229e-05</cost>
    <edge_group_id type="integer">78</edge_group_id>
    <edge_group_label>OH_203</edge_group_label>
    <stat_time type="datetime">2012-10-10T14:00:00+03:00</stat_time>
    <value type="decimal">0.0</value>
  </user_hourly_stat>
</user_hourly_stats>


Where:

cost - the total due for this resource

edge_group_id – the ID of the edge group

edge_group_label – the label of the edge group

stat_time - time when the statistics was gathered

value - traffic value

 

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels