# Return Directory Protection settings This function returns the leech protection settings of the subdirectories in a directory. Endpoint: GET /DirectoryProtection/list_directories Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `dir` (string, required) The absolute or relative file path in the user's directory for which to return leech protection 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: "DirectoryProtection" - `result` (object) - `result.data` (object) - `result.data.children` (array) A list of subdirectories and their leech protection information. The function returns a list for each subdirectory in a directory. - `result.data.children.path` (string) The subdirectory's absolute directory path. Example: "/home/example/example.com/cgi-bin" - `result.data.children.state` (object) A object containing the subdirectory's leech protection information. - `result.data.children.state.has_leech_protection` (integer) The directory's leech protection status. * — Leech protection is enabled. * — Leech protection is disabled. Enum: 1, 0 - `result.data.current` (object) The user's current directory and its leech protection information. - `result.data.current.path` (string) The current directory's absolute file path. Example: "/home/example/example.com" - `result.data.current.state` (object) An object containing the current directory's leech protection information. - `result.data.current.state.has_leech_protection` (integer) The current directory's leech protection status. * — Leech protection is enabled. * — Leech protection is disabled. Enum: 1, 0 - `result.data.home` (object) The user's directory and its leech protection information. - `result.data.home.path` (string) The directory's absolute directory path. Example: "/home/example" - `result.data.home.state` (object) A object containing the directory's leech protection information. - `result.data.home.state.has_leech_protection` (integer) The home directory's leech protection status. * — Leech protection is enabled. * — Leech protection is disabled. Enum: 1, 0 - `result.data.parent` (object) The parent directory of the current directory and its leech protection information. - `result.data.parent.path` (string) The parent directory's absolute directory path. Example: "/home/example" - `result.data.parent.state` (object) An object containing the parent directory's leech protection information. - `result.data.parent.state.has_leech_protection` (integer) The parent directory's leech protection status. * — Leech protection is enabled. * — Leech protection is disabled. Enum: 1, 0 - `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.