---
title: "Return privacy status of subdirectories"
method: GET
path: "/DirectoryPrivacy/list_directories"
tags: ["DirectoryPrivacy", "Directory Privacy"]
---

# Return privacy status of subdirectories

`GET /DirectoryPrivacy/list_directories`

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

## Query parameters

- `dir` string, path, required

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object
      - `children` object[] — An array of objects containing subdirectories and their privacy information. **Note:** The function returns an object for each subdirectory in a directory.
        - `path` string, path — The subdirectory's directory path.
        - `state` object — The subdirectory's privacy information.
          - `auth_name` string — The authentication resource name.
          - `auth_type` 'Basic' | 'None' — The subdirectory's authentication type. * `Basic` * `None`
          - `passwd_file` string, path — The absolute file path to the subdirectory's password file.
          - `protected` 1 | 0 — Whether the subdirectory is protected. * `1` — Protected. * `0` — **Not** protected.
      - `current` object — The user's current directory and its privacy information.
        - `path` string, path — The current directory's path.
        - `state` object — The current subdirectory's privacy information.
          - `auth_name` string — The authentication resource name.
          - `auth_type` 'Basic' | 'None' — The directory's authentication type. * `Basic` * `None`
          - `passwd_file` string, path — The absolute file path to the directory's password file.
          - `protected` 1 | 0 — Whether the directory is protected. * `1` — Protected. * `0` — **Not** protected.
      - `home` object — The user's home directory and its privacy information.
        - `path` string, path — The home directory's absolute path.
        - `state` object — The home directory's privacy information.
          - `auth_name` string — The authentication resource name.
          - `auth_type` 'Basic' | 'None' — The home directory's authentication type. * `Basic` * `None`
          - `passwd_file` string, path — The absolute file path to the home directory's password file.
          - `protected` 1 | 0 — Whether the home directory is protected. * `1` — Protected. * `0` — **Not** protected.
      - `parent` object — The parent directory of the current directory and its privacy information.
        - `path` string, path — The parent directory's absolute directory path.
        - `state` object — The parent directory's privacy information.
          - `auth_name` string — The authentication resource name.
          - `auth_type` 'Basic' | 'None' — The parent directory's authentication type. * `Basic` * `None`
          - `passwd_file` string, path — The absolute file path to the parent directory's password file.
          - `protected` 1 | 0 — Whether the subdirectory is protected. * `1` — Protected. * `0` — **Not** protected.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 1 | 0 — * `1` — Success. * `0` — Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/revisions/632e2f8e6d04/schema)
