Return MySQL users

This function lists the server's database users.

Warning:

On most servers, this function returns a large amount of output. We strongly suggest that you filter and sort the output.

Important:

When you disable the MySQL/MariaDB and PostgreSQL roles and remote MySQL is not already configured, the system disables this function.

SecurityBasicAuth
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/list_database_users
Request samples
whmapi1 --output=jsonpretty \
  list_database_users
Response samples
application/json
{
  • "data": {
    • "payload": [
      • {
        • "cpuser": "example",
        • "engine": "postgresql",
        • "name": "example_user1"
        }
      ]
    },
  • "metadata": {
    • "command": "list_database_users",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}