# Return subdirectories directory indexing settings

This function returns the directory indexing settings of the subdirectories in a directory.

Endpoint: GET /DirectoryIndexes/list_directories
Version: 11.136.0.31
Security: BasicAuth

## Query parameters:

  - `dir` (string, required)
    The absolute path of the directory for which to return indexing 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: "DirectoryIndexes"

  - `result` (object)

  - `result.data` (object)

  - `result.data.children` (array)
    Subdirectories and their indexing information.

Note:

The function returns an object for each subdirectory in a directory.

  - `result.data.children.path` (string)
    The subdirectory's absolute path.
    Example: "/home/example/example.com/cgi-bin"

  - `result.data.children.state` (object)
    The subdirectory's indexing information.

  - `result.data.children.state.index_type` (string)
    The directory's indexing type.

* standard - The directory uses directory indexing with standard formatting.
* disabled - The directory doesn't use directory indexing.
* inherit - The directory uses the system's default settings.
* fancy - The directory uses directory indexing with Apache® httpd’s FancyIndexing directive. The directory will include additional information such as file size and the date of the file's last update.
    Enum: "standard", "disabled", "inherit", "fancy"

  - `result.data.current` (object)
    The user's current directory and its indexing information.

  - `result.data.current.path` (string)
    The current directory's absolute path.
    Example: "/home/example/example.com"

  - `result.data.current.state` (object)
    The current directory's indexing information.

  - `result.data.current.state.index_type` (string)
    The directory's indexing type.

* standard - The directory uses directory indexing with standard formatting.
* disabled - The directory doesn't use directory indexing.
* inherit - The directory uses the system's default settings.
* fancy - The directory uses directory indexing with Apache® httpd’s FancyIndexing directive. The directory will include additional information such as file size and the date of the file's last update.
    Enum: "standard", "disabled", "inherit", "fancy"

  - `result.data.home` (object)
    The user's home directory and its indexing information.

  - `result.data.home.path` (string)
    The home directory's absolute path.
    Example: "/home/example"

  - `result.data.home.state` (object)
    An object containing the home directory's indexing information.

  - `result.data.home.state.index_type` (string)
    The directory's indexing type.

* standard - The directory uses directory indexing with standard formatting.
* disabled - The directory doesn't use directory indexing.
* inherit - The directory uses the system's default settings.
* fancy - The directory uses directory indexing with Apache® httpd’s FancyIndexing directive. The directory will include additional information such as file size and the date of the file's last update.
    Enum: "standard", "disabled", "inherit", "fancy"

  - `result.data.parent` (object)
    The current directory’s parent directory and its indexing information.

  - `result.data.parent.path` (string)
    The parent directory's absolute path.
    Example: "/home/example"

  - `result.data.parent.state` (object)
    The parent directory's indexing information.

  - `result.data.parent.state.index_type` (string)
    The directory's indexing type.

* standard - The directory uses directory indexing with standard formatting.
* disabled - The directory doesn't use directory indexing.
* inherit - The directory uses the system's default settings.
* fancy - The directory uses directory indexing with Apache® httpd’s FancyIndexing directive. The directory will include additional information such as file size and the date of the file's last update.
    Enum: "standard", "disabled", "inherit", "fancy"

  - `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)
    * 1 - Success
* 0 - Failed: Check the errors field for more details.
    Enum: 0, 1

  - `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.


