Description

This function lists the cPanel user accounts and the root user on the server.


Examples 




https://hostname.example.com:2087/cpsess##########/json-api/list_users?api.version=1




https://hostname.example.com:2087/cpsess##########/xml-api/list_users?api.version=1




whmapi1 list_users



{
  "data": {
    "users": [
        "example",
        "root"
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "list_users"
  }
}




<result>
    <data>
        <users>example</users>
        <users>root</users>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>list_users</command>
    </metadata>
</result>



   

Parameters

This function does not accept parameters. 

Returns

ReturnTypeDescriptionPossible valuesExample
usersarray An array of cPanel user accounts.

The list may consist of the following types of accounts:

  • A valid cPanel username.
  • root
example, root