v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
DirectoryPrivacy
Directory Privacy

Return privacy status of subdirectories

This function returns the privacy status of the subdirectories in a directory.

get/DirectoryPrivacy/list_directories

Query parameters

dirstring path required
Example:/home/example/example.com

The directory path for which to return the subdirectories' privacy information.

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": "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
        }
      }
    },
    "status": 1
  }
}