DirectoryPrivacy
Directory Privacy
Return whether directory uses password protection
This function confirms whether a directory uses password protection.
get/DirectoryPrivacy/is_directory_protected
Query parameters
dirstring path required
Example:/home/example/example.com
The absolute directory path on the cPanel account to check for password protection.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "is_directory_protected",
"module": "DirectoryPrivacy",
"result": {
"data": {
"auth_name": "Protected 'example.com'",
"auth_type": "Basic",
"passwd_file": "/home/example/.htpasswds/example.com/passwd",
"protected": 1
},
"status": 1
}
}