hostingaccount::get_bandwidth_usage

Description

Get bandwidth usage for any period.

Request details

Arguments

key
API key
domain
Hosting account domain name
from (YYYY-MM-DD, optional, default: 1st day of current month of current year)
Starting date of reporting period. Result will include bandwidth usage from the start of this date onwards.
to (YYYY-MM-DD, optional, default: current year, month and day)
End date of reporting period. Result will include transactions up to and including this date.

Responses

<?xml version="1.0" encoding="utf-8"?>
<bandwidthusage>
  <amount>19727140</amount>
  <from>2008-08-01</from>
  <to>2008-08-09</to>
</bandwidthusage>
	
amount
Bandwidth used, in bytes, between the from and to dates
from
Starting date of reporting period
to
End date of reporting period

Exceptions

Examples

Get most current bandwidth usage (as of 9th August 2008, covering all of August)

GET /hostingaccount/get_bandwidth_usage/?key=acbd18db4cc2f85cedef654fccc4a4d8&domain=test01.example.com
<?xml version="1.0" encoding="utf-8"?>
<bandwidthusage>
  <amount>19727140</amount>
  <from>2008-08-01</from>
  <to>2008-08-09</to>
</bandwidthusage>
	

Get bandwidth usage for 6th August 2008

GET /hostingaccount/get_bandwidth_usage/?key=acbd18db4cc2f85cedef654fccc4a4d8&domain=test01.example.com&from=2008-08-06&to=2008-08-06
<?xml version="1.0" encoding="utf-8"?>
<bandwidthusage>
  <amount>2190</amount>
  <from>2008-08-06</from>
  <to>2008-08-06</to>
</bandwidthusage>
	

See also

  1. Index
  2. About the API

    1. Summary
    2. Specification
    3. Do not use undocumented features
    4. Change log
  3. Using the API

    1. Requests
      1. Authenticated requests
      2. Limits
      3. Common request value data types
    2. Understanding responses
      1. HTTP status codes used
      2. Exceptions
        1. access
        2. account
        3. database
        4. hostingaccount
        5. server
        6. system
  4. Function reference