my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
# Generate a list of Postgres databases on the account
my $list_pgdatabases = $cpliveapi->api2(
'Postgres', 'listdbs',
);
{
"cpanelresult": {
"apiversion": 2,
"func": "listdbs",
"data": [
{
"sizemeg": "5.17",
"userlist": [
{
"db": "example_pgdb1",
"user": "example_pguser1"
}
],
"db": "example_pgdb1",
"usercount": 1,
"size": "5419008"
},
{
"sizemeg": "5.17",
"userlist": [
{
"db": "example_pgdb2",
"user": "example_pguser2"
},
{
"db": "example_pgdb2",
"user": "example_pguser3"
}
],
"db": "example_pgdb2",
"usercount": 2,
"size": "5419008"
},
{
"sizemeg": "5.17",
"userlist": [
],
"db": "example_pgb3",
"usercount": 0,
"size": "5419008"
},
{
"sizemeg": "5.17",
"userlist": [
],
"db": "example_pgdb4",
"usercount": 0,
"size": "5419008"
},
{
"sizemeg": "5.17",
"userlist": [
],
"db": "example_pgdb5",
"usercount": 0,
"size": "5419008"
}
],
"event": {
"result": 1
},
"module": "Postgres"
}
}
This function does not accept parameters.