This function returns the users who can access a password-protected directory on the cPanel account.
uapi --output=jsonpretty \ --user=username \ DirectoryPrivacy \ list_users \ dir='/home/example/example.com'
{- "apiversion": 3,
- "func": "list_users",
- "module": "DirectoryPrivacy",
- "result": {
- "data": [
- "example1",
- "example2"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}