I want to optimize my automated system.
That means having to use the API
I am looking to learn about the API list as follows:
Hello
Create and delete website are there
Some people just love command line interface and can’t get their eyes of the terminal. We’ve now most of the CyberPanel functionality available via command line. Run cyberpanel -h for more details. This gives you the power to develop your own...
Reading time: 2 mins 🕑
Likes: 4 ❤
Some people just love command line interface and can’t get their eyes of the terminal. We’ve now most of the CyberPanel functionality available via command line. Run cyberpanel -h for more details. This gives you the power to develop your own...
Reading time: 2 mins 🕑
Likes: 4 ❤
Create and delete database
Some people just love command line interface and can’t get their eyes of the terminal. We’ve now most of the CyberPanel functionality available via command line. Run cyberpanel -h for more details. This gives you the power to develop your own...
Reading time: 2 mins 🕑
Likes: 4 ❤
Some people just love command line interface and can’t get their eyes of the terminal. We’ve now most of the CyberPanel functionality available via command line. Run cyberpanel -h for more details. This gives you the power to develop your own...
Reading time: 2 mins 🕑
Likes: 4 ❤
Issue SSL
Some people just love command line interface and can’t get their eyes of the terminal. We’ve now most of the CyberPanel functionality available via command line. Run cyberpanel -h for more details. This gives you the power to develop your own...
Reading time: 2 mins 🕑
Likes: 4 ❤
Today I am going to add CLI functions for managing users, what else do you need?
Edit website and database is not available from CyberPanel either.
Regards
<?php
/*
* API Wrapper for Cyberpanel
* by @jetchirag
*/
class CyberApi
{
private function callUrl($params, $url)
{
return (($params["serversecure"]) ? "https" : "http"). "://".$params["serverhostname"].":". $params['serverport'] ."/api/".$url;
}
private function call_cyberpanel($params,$url,$post = array())
{
$call = curl_init();
curl_setopt($call, CURLOPT_URL, $this->callUrl($params,$url));
curl_setopt($call, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($call, CURLOPT_RETURNTRANSFER, true);
This file has been truncated. show original
<?php
/**
*
* CyberPanel whmcs module
* @jetchirag
*
*/
if (!defined("WHMCS")) {
die("This file cannot be accessed directly");
}
// Include API Class
include("api.php");
function cyberpanel_MetaData()
{
return array(
'DisplayName' => 'CyberPanel',
'APIVersion' => '1.0',
This file has been truncated. show original
For CLI commands that are mentioned above can be executed as it is from any programming language.
Type your comment> @usmannasir said:
CyberPanel API · Apiary
cyberpanel-whmcs/api.php at master · jetchirag/cyberpanel-whmcs · GitHub
cyberpanel-whmcs/cyberpanel.php at master · jetchirag/cyberpanel-whmcs · GitHub
For CLI commands that are mentioned above can be executed as it is from any programming language.
Thanks for your support
After researching, I found the appropriate solution. I use the phpseclib library to log into ssh and execute the cli directly on it!
Need user terminate feature over api. also force user terminate system which will delete all db, email account and everything during user account termination. currently if user has any website or we cant terminate that user. thus we have to manually remove them one by one then terminate the user.
Type your comment> @jobayer said:
Need user terminate feature over api. also force user terminate system which will delete all db, email account and everything during user account termination. currently if user has any website or we cant terminate that user. thus we have to manually remove them one by one then terminate the user.
Use the “phpseclib” library to implement CLI