hostingaccounts::add

Description

Add a new hosting account (to your set of hosting accounts)

Request details

Arguments

key
API key
domain
Domain name for the new hosting account
username
Username for the new hosting account
storageLimit
Storage limit in megabytes (optional)
bandwidthLimit
Monthly bandwidth limit in megabytes (optional)

Responses

<?xml version="1.0" encoding="utf-8"?>
<add_hosting_account_result>
  <service_creation>
    <status>true</status>
  </service_creation>
  <storage_limit>
    <status>true|false</status>
    <value>[storage limit applied]</value>
  </storage_limit>
  <bandwidth_limit>
    <status>true|false</status>
    <value>[bandwidth limit applied]</value>
  </bandwidth_limit>
</add_hosting_account_result>
	
add_hosting_account_result
Container for result of adding hosting account
service_creation
status
Overall result from request (boolean)
storage_limit
status
Whether the storage limit was correctly set (boolean)
value
The storage limit, in megabytes, that was set
bandwidth_limit
status
Whether the bandwidth limit was correctly set (boolean)
value
The bandwidth limit, in megabytes, that was set

Exceptions

Examples

Create a new hosting account with no limits

POST /hostingaccounts/add/
key=acbd18db4cc2f85cedef654fccc4a4d8
&domain=test01.example.com
&username=example
<?xml version="1.0" encoding="utf-8"?>
<add_hosting_account_result>
  <service_creation>
    <status>true</status>
  </service_creation>
  <storage_limit>
    <status>true</status>
    <value>0</value>
  </storage_limit>
  <bandwidth_limit>
    <status>true</status>
    <value>0</value>
  </bandwidth_limit>
</add_hosting_account_result>
	

Create a new hosting account with both storage and bandwidth limits

POST /hostingaccounts/add/
key=acbd18db4cc2f85cedef654fccc4a4d8
&domain=test01.example.com
&username=example
&storage_limit=100
&bandwidth_limit=4096
<?xml version="1.0" encoding="utf-8"?>
<add_hosting_account_result>
  <service_creation>
    <status>true</status>
  </service_creation>
  <storage_limit>
    <status>true</status>
    <value>100</value>
  </storage_limit>
  <bandwidth_limit>
    <status>true</status>
    <value>4096</value>
  </bandwidth_limit>
</add_hosting_account_result>
	

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