Download
The Webuzo NOC API is available only to the NOCs and you can download it from the NOC Panel :
http://www.softaculous.com/noc?ca=download_api
There are many examples at the bottom of the API file to test.
Sandbox
If you would like to test the API in Sandbox mode before you go into production you can use the same NOC account username/password or apikey/apipass and just pass the sandbox parameter in your POST request.
PHP SDK Example
include_once 'noc_api.inc'; $noc = new SOFT_NOC('username', 'password');
$noc->sandbox = 1;
$noc->webuzo_licenses();
CURL Example
curl -X POST -d 'json=1' -d 'sandbox=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' https://www.softaculous.com/clients?ca=webuzo
In order to check your sandbox licenses in Softaculous client area just toggle the Sandbox Mode Switch as shown in the screenshot below.
Note : Do not forget to remove sandbox mode from your code before you push it into production.
Purchase/Renew Webuzo Licenses
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'purchase=1' -d 'ips=188.188.188.188' -d 'toadd=1M' -d 'price=business_c_m' -d 'authemail=test@test.com' -d 'autorenew=1' -d 'notes=Sample Note' https://www.softaculous.com/clients?ca=webuzo_buy
Parameters
purchase : 1 to purchase/renew the license
ips : The IP for which you need to purchase/renew the license
toadd : 1M/1Y based on the period you would like to extend the license
authemail : The email address for notifications related to license expiry/renewal
autorenew : 1 to enable auto renew. 0 to disable auto renew
notes : Your note to help you recognize the license. E.g. server.domain.com
price : Webuzo plan accepted values below :
personal_d_m : Personal Plan (1 User) Dedicated Server Monthly
personal_c_m : Personal Plan (1 User) Cloud/VPS Monthly
personal_d_y : Personal Plan (1 User) Dedicated Server Yearly
personal_c_y : Personal Plan (1 User) Cloud/VPS Yearly
professional_d_m : Professional Plan (15 Users) Dedicated/Cloud/VPS Server Monthly
professional_d_y : Professional Plan (15 Users) Dedicated/Cloud/VPS Server Yearly
business_d_m : Business Plan (Unlimited Users) Dedicated/Cloud/VPS Server Monthly
business_d_y : Business Plan (Unlimited Users) Dedicated/Cloud/VPS Server Yearly
SDK
$noc->webuzo_buy('188.188.188.188', '1M', 1, 'test@test.com', 1, '', 'Sample Note');
- 1st Parameter : Your server's IP
- 2nd Parameter : The period for which you wish to renew. 1M will extend by one months, 8M will extend by eight months, 1Y will extend by One year
- 3rd Parameter : Server type 1 for Dedicated and 2 for VPS
- 4th Parameter : Authorized email (You will get expiry notifications here)
- 5th Parameter : Auto Renew 1 to enable auto renew and 2 to disable auto renew.
- 6th Parameter : (Optional) Server Type i.e. 1 for Dedicated and 2 for VPS
- 7th Parameter : (Optional) Notes for your license
List Webuzo License Details
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' https://www.softaculous.com/clients?ca=webuzo
Optional Parameters :
lickey : Enter the license key if you would like to search by License Key
ips : Enter the license IP if you would like to search by IP
SDK
$noc->webuzo_licenses();
- All Parameters are optional. If no parameter is passed it will list the details of all the licenses under your account.
- 1st Parameter : License Key. This will search by License key.
- 2nd Parameter : Server IP. This will search by Server IP.
- 3rd Parameter : Expiry date. Possible values 1, 2, 3.
- 1 - All Expired Licenses under your account
- 2 - Expiring in 7 Days
- 3 - Expiring in 15 Days
- 4th Parameter : Start value. This is the start limit of the number of licenses you wish to list. Eg you wish to list the licenses from 100th license pass the value as 99.
- 5th Parameter : Length of return from start value. This is the number of licenses you wish to list from the start value. Eg you wish to list the 100th licenses pass the start value as 99 and length value as 1.
- 6th Parameter : Authorized Email. This will list the licenses with the provided email.
Edit IP of a Webuzo License
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD'-d 'lid=1000' -d 'ips=198.198.198.198' -d 'editlicense=1' https://www.softaculous.com/clients?ca=webuzo_showlicense
Parameters:
lid : License ID of the license you would like to edit. Use this API to get the license id using IP or license key.
ips : The New IP you would like to set for the given license
SDK
$noc->webuzo_editips(1000, '198.198.198.198');
- 1st Parameter : License ID. You can get the license id from the licenses() function.
- 2nd Parameter : New IP. This is the new IP for the provided license.
Upgrade Plan of a Webuzo License
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD'-d 'lid=1000' -d 'plan=business' -d 'editlicense=1' https://www.softaculous.com/clients?ca=webuzo_showlicense
Parameters:
lid : License ID of the license you would like to edit. Use this API to get the license id using IP or license key.
plan : The New Plan you would like to upgrade to for the given license
Note : You be charged for the difference amount of the plan based on the validity remaining on your existing license.
Note : You cannot downgrade the license. In order to downgrade the license please contact sales@webuzo.com
SDK
$noc->webuzo_editplan(1000, 'business');
- 1st Parameter : License ID. You can get the license id from the licenses() function.
- 2nd Parameter : New Plan. This is the new plan you would like to upgrade to for the provided license.
Suspend a Webuzo License
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD'-d 'lid=1000' https://www.softaculous.com/clients?ca=webuzo_suspend
Parameters:
lid : License ID of the license you would like to suspend. Use this API to get the license id using IP or license key.
Note : Suspend does not mean the license is cancelled. If you wish to cancel the license use the Cancel License API.
SDK
$noc->webuzo_suspend(1000);
- 1st Parameter : License ID which you would like to suspend. You can get the license id from the licenses() function.
Unsuspend a Webuzo License
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD'-d 'lid=1000' https://www.softaculous.com/clients?ca=webuzo_unsuspend
Parameters:
lid : License ID of the license you would like to unsuspend. Use this API to get the license id using IP or license key.
SDK
$noc->webuzo_unsuspend(1000);
- 1st Parameter : License ID which you would like to unsuspend. You can get the license id from the licenses() function.
License Logs
This API helps you find the purchase/renew/cancel license logs for a give License. This will also return the action id which you can use to refund the transaction.
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'key=88888-88888-88888-88888-88888' https://www.softaculous.com/clients?ca=webuzo_licenselogs
Parameters :
key : Pass the license key for which you need the logs
OR
licip : Pass the license IP for which you need the logs
SDK
$noc->webuzo_licenselogs('WEBUZO-88888-88888-88888-88888');
- 1st Parameter : License Key for which you need license logs
OR - 2nd Parameter : License IP for which you need license logs
Auto Renewals
This API returns the list of licenses that have auto renewals
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' https://www.softaculous.com/clients?ca=webuzo_renewals
SDK
$noc->webuzo_autorenewals();
- All Parameters are optional. If no parameters are passed it will list all the licenses with Auto Renewals under your account.
- 1st Parameter : License Key. This will search by License key.
- 2nd Parameter : Server IP. This will search by Server IP.
- 3th Parameter : Start value. This is the start limit of the number of licenses you wish to list. Eg you wish to list the licenses from 100th license pass the value as 99.
- 4th Parameter : Length of return from start value. This is the number of licenses you wish to list from the start value. Eg you wish to list the 100th licenses pass the start value as 99 and length value as 1.
Add/Enable Auto Renewal
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'lickey=88888-88888-88888-88888-88888' -d 'addrenewal=1' https://www.softaculous.com/clients?ca=webuzo_renewals
Parameters :
lickey : The Webuzo license key for which you want to enable auto renewals
SDK
$noc->webuzo_addautorenewal('WEBUZO-88888-88888-88888-88888');
- 1st Parameter : License Key for which you want to enable Auto Renewal.
Cancel Auto Renewal
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'lickey=88888-88888-88888-88888-88888' -d 'cancelrenewal=1' https://www.softaculous.com/clients?ca=webuzo_renewals
SDK
$noc->webuzo_removeautorenewal('WEBUZO-88888-88888-88888-88888');
- 1st Parameter : License Key for which you want to disable Auto Renewal.
Refund a Transaction
CURL
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'actid=100' https://www.softaculous.com/clients?ca=webuzo_refund
Parameters :
actid : Action ID which you would like to refund. Refer to the following API to get the action id.
SDK
$noc->webuzo_refund(100);
- 1st Parameter : Action ID for which you wish to claim a Refund. You can get the action id from the webuzo_licenselogs() function.
Cancel Webuzo License
CURL
Cancel License by Webuzo License Key
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'lickey=88888-88888-88888-88888-88888' -d 'cancel_license=1' https://www.softaculous.com/clients?ca=webuzo_cancel
Cancel License by Server IP
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'licip=198.198.198.198' -d 'cancel_license=1' https://www.softaculous.com/clients?ca=webuzo_cancel
SDK
$noc->webuzo_cancel('WEBUZO-88888-88888-88888-88888', '198.198.198.198');
- Only one parameter is compulsory. You can pass any one parameter.
- 1st Parameter : License Key for which you want to cancel license.
- 2nd Parameter : Server IP for which you want to cancel license.
Refund and Cancel Webuzo License
This function will first refund all the eligible transactions and then cancel the license.
CURL
Step 1: Get the Action ID using the License Logs API
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'licip=188.188.188.188' https://www.softaculous.com/clients?ca=webuzo_licenselogs
Step 2: Claim a Refund
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'actid=100' https://www.softaculous.com/clients?ca=webuzo_refund
Step 3: Cancel the License
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'licip=188.188.188.188' -d 'cancel_license=1' -d 'force=1' https://www.softaculous.com/clients?ca=webuzo_cancel
SDK
$noc->webuzo_refund_and_cancel('WEBUZO-88888-88888-88888-88888', '198.198.198.198');
- Only one parameter is compulsory. You can pass any one parameter.
- 1st Parameter : License Key for which you want to refund and then cancel license.
- 2nd Parameter : Server IP for which you want to refund and then cancel license.
Webuzo Trial License
This function will issue a Premium Trial License to the given IP.
CURL
Without Promo Code 15 days trial will be installed
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'ips=188.188.188.188' -d 'type=business_c_m' https://www.softaculous.com/clients?ca=webuzotrial
If you have a Promo Code please pass it in the code parameter
curl -X POST -d 'json=1' -d 'nocname=NOC_USERNAME' -d 'nocpass=NOC_PASSWORD' -d 'ips=188.188.188.188' -d 'type=business_c_m' -d 'code=PROMOCODE' https://www.softaculous.com/clients?ca=webuzotrial
Parameters :
ips : The Server IP for which you want to issue the trial license
type : The Webuzo plan with which the trial license should be issued. Possible values below :
business_c_m : Business Cloud
business_d_m :
Business Dedicated
professional_c_m : Professional Cloud
professional_d_m : Professional Dedicated
mini_c_m : Mini Cloud
mini_d_m : Mini Dedicated
personal_c_m : Personal Cloud
personal_d_m : Personal Dedicated
code : (Optional) If you have a promo code pass the promo code here and the trial license validity will be adjusted accordingly
SDK
Without Promo Code 15 days trial will be installed
$noc->webuzotrial('198.198.198.198', 'business_c_m');
If you have a Promo Code please pass it as the 3rd parameter
$noc->webuzotrial('198.198.198.198', 'business_c_m', 'PROMOCODE');
- 1st Parameter : Server IP for which you want to issue a Trial License.
- 2nd Parameter : Plan with which you want to issue the license. Possible options defined below :business_c_m : Business Cloudbusiness_d_m : Business Dedicatedprofessional_c_m : Professional Cloudprofessional_d_m : Professional Dedicatedmini_c_m : Mini Cloudmini_d_m : Mini Dedicatedpersonal_c_m : Personal Cloudpersonal_d_m : Personal Dedicated
- 3rd Parameter : (Optional) The Promo Code to get trial period as per promo code. If no promo code is entered 15 days trial license will be issued.
Debugging
- If there are any Errors while executing the above tasks the Errors will be returned in the $noc->error variable. You can print the errors :
$noc->r($noc->error);
- If the above variable is empty then the tasks were completed without any errors.