Return home directories list

This function returns all the directories where the system stores users' home directories. It returns them in descending order, based on the current amount of available free disk space for each directory. For example, the first directory the function lists has the most available free disk space.

Note:

Use WHM's Basic WebHost Manager Setup (WHM >> Home >> Server Configuration >> Basic WebHost Manager Setup) to configure where the system will create a new user's home directory.

Authorizations:

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 get_homedir_roots

Response samples

Content type
application/json
{
  • "data": {
    • "payload": [
      • {
        • "path": "/home"
        }
      ]
    },
  • "metadata": {
    • "command": "get_homedir_roots",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}