Description
This function lists the account's dabatases.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
| Parameter | Type | Description | Possible values | Example | 
| regex | string | A Perl Compatible Regular Expression (PCRE) that filters the results. The system matches the PCRE to both the database name. | A valid PCRE. | db=example_* | 
Returns
| Return | Type | Description | Possible values | Example | 
| userlist | hash | A hash that contains information about a database and the authorized users. | A hash that includes the db and user returns. | 
 | 
| db | string | The database name. The function returns this value in the userlist hash. | A valid database name. | example_database | 
| user | string | An authorized username. The function returns this value in the userlist hash. | A valid database user name. | example_user1 | 
| sizemeg | string | The database's size. | A real number, in Megabytes (MB). | 0.00 | 
| db | string | The database name. | A valid database name. | example_database | 
| usercount | integer | The number of users that are authorized to use the database. | A valid positive integer. | 1 | 
| size | integer | The database's size. | A valid integer, in bytes. | 0 | 
| reason | string | A reason for failure. Note: This function only returns a reasonvalue if it failed. | A string that describes the error. | This is an error message. | 
| result | Boolean | Whether the function succeeded. | 
 | 1 | 
