1. LOGIN SSH

 

Run below command.

-------------------------------
chmod +x /scripts/endis_oviapi

To enable the ovipanel api, run the below command.

----------------------------------------------------------------------
/scripts/endis_oviapi enable username

To disable the ovipanel api, run the below command.

---------------------------------------------------------------------

/scripts/endis_oviapi disable username

 

notes : /scripts/endis_oviapi enable zadmin


To get the API key, run the below command in ssh.

--------------------------------------------------------------

setso --show apikey

 

Download this ZIP file in your local system,

 

Run the below commands.


wget http://d.ovipanel.in/ovipanelAPI.zip

 

unzip ovipanelAPI.zip

 

cd  ovipanelAPI/

 

Refer the file vim demo.php



Client Notices:

 

 

  • getNotice

 

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$module = module_name;

$apikey = '***************3bcc49503547f68dcbf2';

$request = 'getNotice';

//$port = 2082;

//$authuser = 'username';

//$authpass = '***********';

$port = 2086;

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

Sample Output:

{"success":"this is a testing content"}

{"error":"Client Notcies not available"}

 

 

  • updateNotice

 

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'client_notices';

$apikey = '*******************49503547f68dcbf2';

$request = 'updateNotice';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array("message" => "This is a content");

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



Sample Output:

{"success":"Client Notice updated successfully."}

 

========================================================================

View bandwidth usage:

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'View_Bandwidth_Usage';

$apikey = '***********bcc49503547f68dcbf2';

$request = 'getFullJson';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



Sample Output:

{"success":"{\"vnstatversion\":\"1.15\",\"jsonversion\":\"1\",\"interfaces\":[{\"id\":\"ens192\",\"nick\":\"ens192\",\"created\":{\"date\":{\"year\":2020,\"month\":3,\"day\":10}},\"updated\":{\"date\":{\"year\":2020,\"month\":4,\"day\":2}}

========================================================================

enableErrorlogs

 

 

  • ApacheErrorLogStatus

 

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'enableErrorlogs';

$apikey = '***********3bcc49503547f68dcbf2';

$request = 'ApacheErrorLogStatus';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



Sample Output:

 

{"success":"Apache Error Log was enabled"}

{"success":"Apache Error Log was disabled"}

 

 

  • MysqlErrorLogStatus

 

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'enableErrorlogs';

$apikey = '***********bcc49503547f68dcbf2';

$request = 'MysqlErrorLogStatus';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



Sample Output:

{"success":"Mysql Error Log was disabled"}

{"success":"Mysql Error Log was enabled"}

 

  1. updateErrorLog

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'enableErrorlogs';

$apikey = '***********cc49503547f68dcbf2';

$request = 'updateErrorLog';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array("mysql"=> "false","apache" => "false" );

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

Sample Output:

{"success":"Log Settings updated successfully"}

{"failure":"Pass Apache \/ Mysql Error Log parameter properly."}



========================================================================

 

Softaculousacp

 

 

  • ListAllUserStatus

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'softaculousacp';

$apikey = '***********3bcc49503547f68dcbf2';

$request = 'ListAllUserStatus';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);




Sample Output:

 

{"response":[{"username":"rahulsara","status":"disabled"},{"username":"patch","status":"disabled"},{"username":"jegan","status":"disabled"},{"username":"aoodycoin","status":"disabled"},{"username":"sds","status":"disabled"},{"username":"saravanab","status":"disabled"},{"username":"suvid58","status":"disabled"}]}

 

 

  • updateUserStatus

 

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'softaculousacp';

$apikey = '***********cc49503547f68dcbf2';

$request = 'updateUserStatus';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array('username'=>'jegan','status'=>'disabled');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



Sample Output:

 

{"success":"jegan disabled successfully"}

{"success":"jegan enabled successfully"}

 

========================================================================

Managedssh

 

 

  • ListAllSSHStatus

 

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'managedssh';

$apikey = '***********49503547f68dcbf2';

$request = 'ListAllSSHStatus';

//$authuser = 'username;

//$authpass = '***********;

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



//sample Output

 

{"response":[{"username":"rahulsara","status":"disable"},{"username":"patch","status":"jail"},{"username":"jegan","status":"disable"},{"username":"aoodycoin","status":"normal"},{"username":"sds","status":"disable"},{"username":"saravanab","status":"jail"},{"username":"suvid58","status":"disable"}]}

 

 

  • updateSSHStatus

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'managedssh';

$apikey = '***********c49503547f68dcbf2';

$request = 'updateSSHStatus';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array('username'=>"patch",'status'=>"disable");

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

                                                                                                                 

 

// Sample Output 

 

{"error":"test does not exists"}

{"error":"Allowed status are jail \/ normal \/ disable"}

{"success":"patch status was updated successfully"}

 

========================================================================

 

Servertime

 

 

  • currentTimeZone

 

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'servertime';

$apikey = '***********503547f68dcbf2';

$request = 'currentTimeZone';

//$authuser = 'usernameb';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

// sample Output

{"response":"Asia\/Kolkata"}

 

 

  • getAvailableTimeZone

 

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'servertime';

$apikey = '***********bcc49503547f68dcbf2';

$request = 'getAvailableTimeZone';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

~                                                                                                                          



//Sample Output

 

{"response":["Africa\/Abidjan","Africa\/Accra","Africa\/Addis_Ababa","Africa\/Algiers","Africa\/Asmara","Africa\/Bamako","Africa\/Bangui","Africa\/Banjul","Africa\/Bissau","Africa\/Blantyre","Africa\/Brazzaville","Africa\/Bujumbura","Africa\/Cairo","Africa\/Casablanca","Africa\/Ceuta","Africa\/Conakry","Africa\/Dakar","Africa\/Dar_es_Salaam","Africa\/Djibouti","Africa\/Douala","Africa\/El_Aaiun","Africa\/Freetown"]}

 

// sample Output 

{"error":"Not a proper timezone. pass a parameter properly"}



  1. updateTimeZone

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'servertime';

$apikey = '***********c49503547f68dcbf2';

$request = 'updateTimeZone';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array('timezone'=>"Australia/Lindeman");

$output1=$OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

$request = 'currentTimeZone';

sleep(5);

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

                                                        

// sample output:

Curl error: Empty reply from server 

{"response":"Australia\/Lindeman"}

                                                       




========================================================================

 

Packages

 

1.GetAllPackages

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'packages';

$apikey = '***********c49503547f68dcbf2';

$request = 'GetAllPackages';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

// Sample Output:

 

{"response":[{"packageid":"1","created":"11:31 6th Apr 2020 IST","clients":7,"packagename":"Administration"},{"packageid":"3","created":"11:31 6th Apr 2020 IST","clients":"0","packagename":"test"}] 

 

  1. GetPackageId

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'packages';

$apikey = '***********49503547f68dcbf2';

$request = 'GetPackageId';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array("pakagename"=>'test123');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



========================================================================

 

Mysql Databases:



 

  • Check Database Exists Or not 

 

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'mysql_databases';

$apikey = '***********3bcc49503547f68dcbf2';

$request = 'DatabaseExists';

$authuser = 'username';

$authpass = 'password';

$input = array('databasename' => 'test123');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

sample Output:

=============

 {"response":"mysql is exists"} 

 {"response":"test123 does not exists"}

 

 

  • Create Database

 

 

databasename

Pass the databasename

prefix

1 -> add prefix 0 -> No prefix

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'mysql_databases';

$apikey = '***********49503547f68dcbf2';

$request = 'CreateDatabase';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('databasename' => '123','prefix'=> 0);

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);




{"error":"Kindly pass the prefix"}

{"error":"Kindly pass the prefix properly (1 or 0)"}

{"error":"Already saravanab_123 is exists"}

{"success":"123 created successfully"}

 

 

  • Delete Database

 

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'mysql_databases';

$apikey = '***********bcc49503547f68dcbf2';

$request = 'DeleteDatabase';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('databasename' => 'test123');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

// sample Output 

{"success":"saravanab_123 deleted successfully"}

{"error":"saravanab_123 does not exists under the username saravanab"}



 

  • List Databases

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'mysql_databases';

$apikey = '***********9503547f68dcbf2';

$request = 'ListDatabase';

$authuser = 'username';

$authpass = 'password';

$input = array();

 

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);




sample Output:

=============

 

  1. {"success":[{"totaldb":"1","mysqlname":"saravanab_jgtuk5","mysqlsize":"376832","mysqlfriendlysize":"368 KB"},{"totaldb":"1","mysqlname":"saravanab_qnln2f","mysqlsize":"376832","mysqlfriendlysize":"368 KB"}]}
  2. {"response":"Database not yet created"}



totaldb

How many user was used in this DB

mysqlname

Mysql username

mysqlsize

Size of the mysql database

mysqlfriendlysize

Size of the mysql database in user friendly





======================================================================



Email Routing

 

 

  • getMXServerType

 




require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'email_routing';

$apikey = '***********bcc49503547f68dcbf2';

$request = 'getMXServerType';

$authuser = 'username';

$authpass = 'password';

$input = array('domain' => 'test123.com');

 

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

// sample Output 

{"error":"saravanab and test123.com mismatch"}

{"response":"wordpressget.in running under Local Mail Exchanger"}

{"response":"saravanababu.cf running under Remote Mail Exchanger"}

 

  1. updateServerType



domain

Need to pass domain name 

servertype

"0" => "Local Mail Exchanger", "1" => "Remote Mail Exchanger"



<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'email_routing';

$apikey = '***********cc49503547f68dcbf2';

$request = 'updateServerType';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

 

$input = array('domain' => 'saravanababu.cf','servertype' => '1');

//$input = array('domain' => 'rahulsarava.com');

 

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

// sample Output 

{"success":"saravanababu.cf is conigured to Remote Mail Exchanger successfully."}

{"success":"saravanababu.cf is conigured to Local Mail Exchanger successfully."}

{"error":"saravanab and rahulsarava.com mismatch"}

======================================================================

Phpconfig

 

getPHPConfigurationValues

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'phpconfig';

$apikey = '***********49503547f68dcbf2';

$request = 'getPHPConfigurationValues';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

// sample output: 

{"short_open_tag":"Off","max_input_vars":"1000","upload_max_filesize":"512","memory_limit":"128","max_input_time":"600","max_execution_time":"300","file_uploads":"On","post_max_size":"512"}

 

UpdatePHPConfigurationValues

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'phpconfig';

$apikey = '***********cc49503547f68dcbf2';

$request = 'UpdatePHPConfigurationValues';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array("short_open_tag"=>"Off","max_input_vars"=>"21000","upload_max_filesize"=>"2512","memory_limit"=>"2128","max_input_time"=>"2600","max_execution_time"=>"2300","file_uploads"=>"On","post_max_size"=>"2512","display_errors" => "Off");

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



{"success":"PHP configuration updated successfully.It may reflect within 5 mins in your website."}

{"error":"Pass all properties properly"}



======================================================================

 

PHPVersion

 

getPHPVersionOfDomain

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'phpversion';

$apikey = '***********bcc49503547f68dcbf2';

$request = 'getPHPVersionOfDomain';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('domain' => 'saravanababu.cf');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



//sample output

 

{"error":"saravanab and test.com mismatch"}

{"response":"saravanababu.cf running under the PHP 7.0 Version."}

 

updatePHPVersion



domain

Pass the domain name

phpversion 

Pass the phpversion (Allowed values are php54,php55,php56,php70,php71,php72,php73)

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'phpversion';

$apikey = '***********9503547f68dcbf2';

$request = 'updatePHPVersion';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('domain' => 'sdsaravanababu.cf','phpversion'=>'php54ds');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

// Sample output

{"success":"PHP Version updated successfully.It may reflect within 5 mins in your website."}

{"error":"pass phpversion parameter properly"}

{"error":"saravanab and sdsaravanababu.cf mismatch"}

=======================================================================

Addmime

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'addmime';

$apikey = '***********9503547f68dcbf2';

$request = 'getAllMIME';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);




//sample output

{"response":"[{\"mime_name\":\"application\\\/andrew-inset\",\"mime_ext\":\"ez\"},{\"mime_name\":\"application\\\/atom+xml\",\"mime_ext\":\"atom\"},{\"mime_name\":\"application\\\/atomcat+xml\",\"mime_ext\":\"atomcat\"},{\"mime_name\":\"application\\\/atomdeleted+xml\",\"mime_ext\":\"atomdeleted\"},{\"mime_name\":\"application\\\/atomsvc+xml\",\"mime_ext\":\"atomsvc\"},{\"mime_name\":\"application\\\/auth-policy+xml\",\"mime_ext\":\"apxml\"},{\"mime_name\":\"application\\\/calendar+xml\",\"mime_ext\":\"xcs\"},{\"mime_name\":\"application\\\/ccmp+xml\",\"mime_ext\":\"ccmp\"},{\"mime_name\":\"application\\\/ccxml+xml\",\"mime_ext\":\"ccxml\"},{\"mime_name\":\"application\\\/cdmi-capability\",\"mime_ext\":\"cdmia\"},{\"mime_name\":\"application\\\/cdmi-container\",\"mime_ext\":\"cdmic\"},{\"mime_name\":\"application\\\/cdmi-domain\",\"mime_ext\":\"cdmid\"}]”}

 

=======================================================================

EmailBoxes

 

UpdateMailBoxQuota

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'mailboxes';

$apikey = '***********cc49503547f68dcbf2';

$request = 'UpdateMailBoxQuota';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('email' => This email address is being protected from spambots. You need JavaScript enabled to view it.','quota' => '0s00');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



//sample output 

{"success":"Quota Updated successfully"}

{"error":"Pass the all parameter properly."}

 

UpdateMailOutGoingLimit

 

<?php

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'mailboxes';

$apikey = '***********c49503547f68dcbf2';

$request = 'UpdateMailOutGoingLimit';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('email' => This email address is being protected from spambots. You need JavaScript enabled to view it.','limit' => '700');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);




//Sample Output

{"success":"Quota Updated successfully"}

{"error":"Pass the all parameter properly."}

 

deleteMailBox

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'mailboxes';

$apikey = '***********49503547f68dcbf2';

$request = 'deleteMailBox';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('email' => This email address is being protected from spambots. You need JavaScript enabled to view it.');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

// Sample Output 

{"error":"This email address is being protected from spambots. You need JavaScript enabled to view it. does not exists under the saravanab"}

{"success":"Mailbox Deleted successfully"}



ResetPassword

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'mailboxes';

$apikey = '***********49503547f68dcbf2';

$request = 'ResetPassword';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('email' => This email address is being protected from spambots. You need JavaScript enabled to view it.','password' => '[email protected]#');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



//sample output

{"error":"Your password did not meet the minimun length requirements.Characters needed for password length : 9 with atleast 1 uppercase,lowercase,special character.number"}



createMailBox

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'mailboxes';

$apikey = '***********49503547f68dcbf2';

$request = 'createMailBox';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('email' => This email address is being protected from spambots. You need JavaScript enabled to view it.','password' => '[email protected]#','quota'=>'1024','mailperlimit'=>'1024');

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



//sample output

{"error":"pass the Quota as integer"}

{"error":"This email address is being protected from spambots. You need JavaScript enabled to view it. already exists"}

{"success":"Email created successfully"}

 

========================================================================

 

Subdomainlist

getAllSubDomainList

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'subdomainlist';

$apikey = '***********c49503547f68dcbf2';

$request = 'getAllSubDomainList';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

// sample output 

 

{"success":"[{\"domainlist\":\"sub.patch.com,demo.patch.com\",\"username\":\"patch\"},{\"domainlist\":\"sub2.saravanababu.cf,sub1.saravanababu.cf\",\"username\":\"saravanab\"}]"}

 

========================================================================

 

Parkeddomainlist

 

getAllParkedDomainList

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2086;

$module = 'parkeddomainlist';

$apikey = '***********3bcc49503547f68dcbf2';

$request = 'getAllParkedDomainList';

//$authuser = 'username';

//$authpass = '***********';

$authuser = 'zadmin';

$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

//sample output 

{"error":"No Parked Domain available."}

{"success":"[{\"domainlist\":\"testparked2.com,testparked.com\",\"username\":\"saravanab\"}]"}

 

=======================================================================

 

Parked_domains

 

ListParkedDomain

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'parked_domains';

$apikey = '***********49503547f68dcbf2';

$request = 'ListParkedDomain';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

Sample output:

 

{"response":"[{\"name\":\"testparked.com\",\"directory\":\"\\\/public_html\",\"active\":\"1\",\"created\":\"1585210434\",\"id\":\"24\"},{\"name\":\"testparked2.com\",\"directory\":\"\\\/public_html\",\"active\":\"1\",\"created\":\"1585210450\",\"id\":\"25\"}]"}

 

DeleteParkedDomain

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'parked_domains';

$apikey = '***********cc49503547f68dcbf2';

$request = 'DeleteParkedDomain';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('domain' => "testparked.com");

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);




{"error":"test.com does not exists under saravanab"}

{"success":"testparked.com deleted successfully"}



CreateParkedDomain

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'parked_domains';

$apikey = '***********9503547f68dcbf2';

$request = 'CreateParkedDomain';

$authuser = 'susername';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('domain' => "testparked.com");

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);

 

//sample output 

 

{"error":"testparked.com already exists"}

{"success":"testparked.com created successfully"}

 

===========================================================

 

Sub_domains

 

ListSubDomain



<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'sub_domains';

$apikey = '***********49503547f68dcbf2';

$request = 'ListSubDomain';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



{"response":"[{\"name\":\"sub1.saravanababu.cf\",\"directory\":\"\\\/sub1_saravanababu_cf\",\"active\":\"1\",\"0\":\"string\",\"id\":\"22\"},{\"name\":\"sub2.saravanababu.cf\",\"directory\":\"\\\/sub2_saravanababu_cf\",\"active\":\"1\",\"0\":\"string\",\"id\":\"23\"}]"}




DeleteSubDomain

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'sub_domains';

$apikey = '***********49503547f68dcbf2';

$request = 'DeleteSubDomain';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('domain' => "sub1.saravanababu.cf");

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);




//sample Output

{"success":"sub1.saravanababu.cf deleted successfully"}

{"error":"sub1.saravanababu.cf does not exists under saravanab"}

 

CreateSubDomain

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'sub_domains';

$apikey = '***********49503547f68dcbf2';

$request = 'CreateSubDomain';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array('domain' => "jega.saravanababu.cf");

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);




//Sample Output 

 

{"error":"testparkedcd.com does not exists under saravanab"}

{"success":"sub4.saravanababu.cf created successfully"}

{"error":"sub4.saravanababu.cf already exists"}

 

========================================================================

 

Addon Domains:

==============

 

<?php

 

require __DIR__.'/ovipanelapi.php';

$input = array();

$OvipanelAPI = new OvipanelAPI();

 

$server_ip = '101.xx.xx.1';

$port = 2082;

$module = 'domains';

$apikey = '***********cc49503547f68dcbf2';

$request = 'ListAddonDomain';

$authuser = 'username';

$authpass = '***********';

//$authuser = 'zadmin';

//$authpass = '***********';

$input = array();

echo $OvipanelAPI->OvipanelAPIResquest($server_ip, $port, $module, $input, $apikey, $request, $authuser, $authpass);



Sample output:

============

{"response":{"vh_id_pk":"19","vh_acc_fk":"10","vh_name_vc":"testaddon2.com","vh_directory_vc":"\/testaddon2_com","vh_type_in":"1","vh_active_in":"1","vh_suhosin_in":"1","vh_obasedir_in":"1","vh_custom_tx":"","vh_custom_port_in":"80","vh_custom_ip_vc":"","vh_portforward_in":"","vh_soaserial_vc":"1","vh_created_ts":"1585207152","vh_deleted_ts":"","vh_modhttp":"1","vh_modhttp_status":"1","ip_deleted":""}}