I have used php sample codes to create api endpoint:
public function AddDatabase(){
//拼接URL地址
$url = $this->BT_PANEL.'/database?action=AddDatabase';
// //准备POST数据
$p_data = $this->GetKeyData(); //取签名
$p_data['name'] = $dbName = 'test_database';
$p_data['codeing'] = 'utf8'; // utf8mb4
$p_data['db_user'] = 'sample_user';
$p_data['password'] = 'Zp732Rbk6szn6dcc';
$p_data['dtype'] = 'MySQL';
$p_data['dataAccess'] = '127.0.0.1';
$p_data['sid'] = '0';
$p_data['active'] = 'false';
$p_data['ps'] = $dbName;
$p_data['ssl'] = '';
//请求面板接口
$result = $this->HttpPostCookie($url, $p_data);
//解析JSON数据
$data = json_decode($result, true);
return $data;
}
$bt = new bt_api();
print_r( $bt->AddDatabase() );
but no action is done or result is returned, will you please check?
Thanks.