# Return privacy status of subdirectories This function returns the privacy status of the subdirectories in a directory. Endpoint: GET /DirectoryPrivacy/list_directories Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `dir` (string, required) The directory path for which to return the subdirectories' privacy information. Example: "/home/example/example.com" ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "list_directories" - `module` (string) The name of the module called. Example: "DirectoryPrivacy" - `result` (object) - `result.data` (object) - `result.data.children` (array) An array of objects containing subdirectories and their privacy information. The function returns an object for each subdirectory in a directory. - `result.data.children.path` (string) The subdirectory's directory path. Example: "/home/example/example.com/cgi-bin" - `result.data.children.state` (object) The subdirectory's privacy information. - `result.data.children.state.auth_name` (string) The authentication resource name. Example: "Protected 'example.com'" - `result.data.children.state.auth_type` (string) The subdirectory's authentication type. * * Enum: "Basic", "None" - `result.data.children.state.passwd_file` (string) The absolute file path to the subdirectory's password file. Example: "/home/example/.htpasswds/example.com/passwd" - `result.data.children.state.protected` (integer) Whether the subdirectory is protected. * — Protected. * — protected. Enum: 1, 0 - `result.data.current` (object) The user's current directory and its privacy information. - `result.data.current.path` (string) The current directory's path. Example: "/home/example/example.com" - `result.data.current.state` (object) The current subdirectory's privacy information. - `result.data.current.state.auth_type` (string) The directory's authentication type. * * Enum: "Basic", "None" - `result.data.current.state.passwd_file` (string) The absolute file path to the directory's password file. Example: "/home/example/.htpasswds/example.com/passwd" - `result.data.current.state.protected` (integer) Whether the directory is protected. * — Protected. * — protected. Enum: 1, 0 - `result.data.home` (object) The user's home directory and its privacy information. - `result.data.home.path` (string) The home directory's absolute path. Example: "/home/example" - `result.data.home.state` (object) The home directory's privacy information. - `result.data.home.state.auth_type` (string) The home directory's authentication type. * * Enum: "Basic", "None" - `result.data.home.state.passwd_file` (string) The absolute file path to the home directory's password file. Example: "/home/example/.htpasswds/example.com/passwd" - `result.data.home.state.protected` (integer) Whether the home directory is protected. * — Protected. * — protected. Enum: 1, 0 - `result.data.parent` (object) The parent directory of the current directory and its privacy information. - `result.data.parent.path` (string) The parent directory's absolute directory path. Example: "/home/example" - `result.data.parent.state` (object) The parent directory's privacy information. - `result.data.parent.state.auth_type` (string) The parent directory's authentication type. * * Enum: "Basic", "None" - `result.data.parent.state.passwd_file` (string) The absolute file path to the parent directory's password file. Example: "/home/example/.htpasswds/example.com/passwd" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) * — Success. * — Failed. Check the field for more details. Enum: 1, 0 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.