hostingaccount::get

Description

Get summary details for a hosting account.

Request details

Arguments

key
API key
domain
Hosting account domain name

Responses

<?xml version="1.0" encoding="utf-8"?>
<hostingaccount>
  <domain>test01.example.com</domain>
  <username>user01</username>
  <owner>u@example.com</owner>
  <creationtime>2008-03-13 21:45:26</creationtime>
  <serverip>78.31.104.54</serverip>
  <storagelimit>110</storagelimit>
  <bandwidthlimit>100</bandwidthlimit>
  <storageusage>36099157</storageusage>
  <bandwidthusage>2190</bandwidthusage>
  <storagecost>3.34478031415</storagecost>
  <bandwidthcost>0</bandwidthcost>
  <status>active</status>
</hostingaccount>

<?xml version="1.0" encoding="utf-8"?>
<hostingaccount>
  <domain>test02.example.com</domain>
  <username>user02</username>
  <owner>u@example.com</owner>
  <creationtime>2008-03-13 21:45:26</creationtime>
  <serverip>78.31.104.54</serverip>
  <storagelimit>110</storagelimit>
  <bandwidthlimit>100</bandwidthlimit>
  <storageusage>36099157</storageusage>
  <bandwidthusage>2190</bandwidthusage>
  <storagecost>3.34478031415</storagecost>
  <bandwidthcost>0</bandwidthcost>
  <status>suspended</status>
  <suspendedby>admin</suspendedby>
  <suspensioncategory>breach</suspensioncategory>
  <suspensionreason>Account responsible for sending spam</suspensionreason>
</hostingaccount>
	
domain
Hosting account domain name
username
Hosting account control panel user name
owner
Email address of account to which hosting account belongs
creationtime
Date and time hosting account was created (YYYY-MM-DD HH:MM:SS)
serverip
IP address of server on which hosting account resides
storagelimit
0 (zero)
No storage limit
Any other value
Storage limit in megabytes
bandwidth limit
0 (zero)
No bandwidth limit
Any other value
Monthly bandwidth limit in megabytes

This is identical to the bandlimit returned by calling hostingaccount::get_bandwidth_limit.

storageusage
Last recorded storage usage in bytes
bandwidthusage
Last recorded monthly bandwidthusage usage in bytes
storagecost
Storage cost for the current month in pence
bandwidthcost

Bandwidth cost for the current month in pence.

This is identical to the amount returned by calling hostingaccount::get_bandwidth_cost with no from or to arguments.

status
active
Hosting account is active, all OK
suspended
Hosting account has been suspended (see suspensionreason and suspensioncategory for details)
deleted
Hosting account is no more
suspensioncategory (only present if status=suspended, not present if suspendedby=user)
diskOverusage
Hosting account has exceeded its storage limit
bandwidthOverusage
Hosting account has exceeded its monthly bandwidth limit
overdrawn
Suspended as the owner's account balance is zero or less
breach
Suspended for a breach of the terms of service
suspendedby (only present if status=suspended)
user
Hosting account owner chose to suspend
system
Suspended automatically by the system (when suspensioncategory=diskOverusage, suspensioncategory=bandwidthOverusage or suspensioncategory=overdrawn)
admin
A system administrator chose to suspend the hosting account (normally when suspensioncategory=breach
suspensionreason (only present if status=suspended)
A textual description of why the hosting account was suspended. This will commonly be omitted in cases where the reason for suspension is clear from the suspension category, specifically:
  • suspensioncategory=diskOverusage
  • suspensioncategory=bandwidthOverusage
  • suspensioncategory=overdrawn

Exceptions

Examples

Get active hostingaccount

GET /hostingaccount/get/?key=acbd18db4cc2f85cedef654fccc4a4d8&domain=test01.example.com
<?xml version="1.0" encoding="utf-8"?>
<hostingaccount>
  <domain>test01.example.com</domain>
  <username>user01</username>
  <owner>u@example.com</owner>
  <creationtime>2008-03-13 21:45:26</creationtime>
  <serverip>78.31.104.54</serverip>
  <storagelimit>110</storagelimit>
  <bandwidthlimit>100</bandwidthlimit>
  <storageusage>36099157</storageusage>
  <bandwidthusage>2190</bandwidthusage>
  <storagecost>3.34478031415</storagecost>
  <bandwidthcost>0</bandwidthcost>
  <status>active</status>
</hostingaccount>
	

Get suspended hostingaccount

GET /hostingaccount/get/?key=acbd18db4cc2f85cedef654fccc4a4d8&domain=test02.example.com
<?xml version="1.0" encoding="utf-8"?>
<hostingaccount>
  <domain>test02.example.com</domain>
  <username>user02</username>
  <owner>u@example.com</owner>
  <creationtime>2008-03-13 21:45:26</creationtime>
  <serverip>78.31.104.54</serverip>
  <storagelimit>110</storagelimit>
  <bandwidthlimit>100</bandwidthlimit>
  <storageusage>36099157</storageusage>
  <bandwidthusage>2190</bandwidthusage>
  <storagecost>3.34478031415</storagecost>
  <bandwidthcost>0</bandwidthcost>
  <status>suspended</status>
  <suspendedby>admin</suspendedby>
  <suspensioncategory>breach</suspensioncategory>
  <suspensionreason>Account responsible for sending spam</suspensionreason>
</hostingaccount>
	

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