hostingaccounts::add
Description
Add a new hosting account (to your set of hosting accounts)
Request details
-
Method
POST
-
URL
https://api.hostingreborn.com/hostingaccounts/add/
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
-
hostingaccounts::list
List your hosting accounts