Return authorized users for protected directory

This function returns the users who can access a password-protected directory on the cPanel account.

SecurityBasicAuth
Request
query Parameters
dir
required
string <path>

The password-protected directory for which to return authorized users.

Example: dir=/home/example/example.com
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/DirectoryPrivacy/list_users
Request samples
uapi --output=jsonpretty \
  --user=username \
  DirectoryPrivacy \
  list_users \
  dir='/home/example/example.com'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "list_users",
  • "module": "DirectoryPrivacy",
  • "result": {
    • "data": [
      • "example1",
      • "example2"
      ],
    • "errors": null,
    • "messages": null,
    • "metadata": {
      • "transformed": 1
      },
    • "status": 1,
    • "warnings": null
    }
}