Description
This function deletes a PostgreSQL database.
Examples
cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Postgresql/delete_database?name=database
LiveAPI PHP Class
$cpanel
=
new
CPANEL();
$delete_database
=
$cpanel
->uapi(
'Postgresql'
,
'delete_database'
,
array
(
'name'
=>
'database'
,
)
);
LiveAPI Perl Module
my
$cpliveapi
= Cpanel::LiveAPI->new();
my
$delete_database
=
$cpliveapi
->uapi(
'Postgresql'
,
'delete_database'
,
{
'name'
=>
'database'
,
}
);
cPanel Template Toolkit
[% data = execute( 'Postgresql', 'delete_database', { name => 'database'} ); %]
Command Line
uapi --user=username Postgresql delete_database name=database
|
Output (JSON)
{
"messages": null,
"errors": null,
"status": 1,
"metadata": {
},
"data": null
}
Parameters
Parameter
|
Type
|
Description
|
Possible values
|
Example
|
name
|
string
|
Required
The database's name.
|
A valid string.
|
database
|
Returns
This function only returns metadata.