DirectoryPrivacy
Directory Privacy

Return privacy status of subdirectories

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

get/DirectoryPrivacy/list_directories

Request

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

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

Changes

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