This function returns the privacy status of the subdirectories in a directory.
uapi --output=jsonpretty \ --user=username \ DirectoryPrivacy \ list_directories \ dir='/home/example/example.com'
{- "apiversion": 3,
- "func": "list_directories",
- "module": "DirectoryPrivacy",
- "result": {
- "data": {
- "children": [
- {
- "path": "/home/example/example.com/cgi-bin",
- "state": {
- "auth_name": "Protected 'example.com'",
- "auth_type": "Basic",
- "passwd_file": "/home/example/.htpasswds/example.com/passwd",
- "protected": 1
}
}
], - "current": {
- "path": "/home/example/example.com",
- "state": {
- "auth_name": "protected",
- "auth_type": "Basic",
- "passwd_file": "/home/example/.htpasswds/example.com/passwd",
- "protected": 1
}
}, - "home": {
- "path": "/home/example",
- "state": {
- "auth_name": "protected",
- "auth_type": "Basic",
- "passwd_file": "/home/example/.htpasswds/example.com/passwd",
- "protected": 1
}
}, - "parent": {
- "path": "/home/example",
- "state": {
- "auth_name": "protected",
- "auth_type": "Basic",
- "passwd_file": "/home/example/.htpasswds/example.com/passwd",
- "protected": 1
}
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}