DirectoryPrivacy
Directory Privacy

Return whether directory uses password protection

This function confirms whether a directory uses password protection.

get/DirectoryPrivacy/is_directory_protected

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

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.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

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
  }
}

Changes

No recorded changes to this operation across all 5 revisions of this API.