v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
File Restoration

Return backups in home directory

This function lists all of the backup files and directories in the user's home directory.

Important:

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

get/Restore/directory_listing

Query parameters

pathstring required
Example:/public_html/

A path to a subdirectory within the user's home directory, or any level below it.

Note:

The value of this parameter must begin and end with a forward slash (/) for security purposes.

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": "directory_listing",
  "module": "Restore",
  "result": {
    "data": [
      {
        "exists": 1,
        "name": "public_html",
        "onDiskType": "file",
        "type": "file"
      }
    ],
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}