v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
Fileman
Manage Files

Return autocomplete file and directory names

This function returns any files and directories that begin with a specified string.

Important:

When you disable the File Storage role, the system disables this function.

get/Fileman/autocompletedir

Query parameters

pathstring required
Example:public

The prefix of the paths to complete.

dirsonly1 | 0

Whether to include only directories in the output.

  • 1Only include directories.
  • 0 — Include directories and files.
html0 | 1
Example:1

Whether to return HTML-encoded results.

  • 1 — Return HTML-encoded output.
  • 0 — Return plaintext output.
list_all1 | 0

Whether to return all files and directories inside the specified directory. If you set this parameter's value to 1, you must set the path parameter's value to a full directory path.

  • 1 — Return all files and directories inside the specified directory.
  • 0 — Return partial file and directory name matches.

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": "autocompletedir",
  "module": "Fileman",
  "result": {
    "data": [
      {
        "file": "public_ftp"
      }
    ],
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}