# Return backup storage locations

This function lists all of an item's backup locations. An item can be a file, a directory, or a symlink.

Important:

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

Endpoint: GET /Restore/query_file_info
Version: 11.138.0.19
Security: BasicAuth

## Query parameters:

  - `path` (string, required)
    A file, directory, or symlink in the user's directory tree.

Note:

The value of this parameter must begin with a forward slash (/).
    Example: "/public_html/index.php"

  - `exists` (integer)
    Whether to show the exist return, which indicates whether the item exists in the
local disk or only in the backup.

* 1 — Show the exist return's value.
* 0 — Do not show the exists return's value.
    Enum: 1, 0

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "query_file_info"

  - `module` (string)
    The name of the module called.
    Example: "Restore"

  - `result` (object)

  - `result.data` (array)
    An array of objects containing the item's details.

  - `result.data.backupDate` (string)
    The date when the system created the backup.
    Example: "2020-07-01T00:00:00.000Z"

  - `result.data.backupID` (string)
    The backup's identification.

* A date, in YYYY-MM-DD format.
* incremental — An incremental daily backup.
* The backup frequency (weekly or monthly) , a slash character (/), and the value incremental.
* The backup frequency (weekly or monthly), a slash character (/), and the backup date, in YYYY-MM-DD format.
    Example: "weekly/2017-07-01"

  - `result.data.backupType` (string)
    The backup type.

* compressed —  A compressed tar file.
* incremental — A full tree of files and directories.
* uncompressed — An uncompressed tar file.
    Enum: "compressed", "incremental", "uncompressed"

  - `result.data.exists` (integer)
    Whether the item (a file, a directory, or a symlink) exists in the local disk or only in the backup.

* 1 — The item exists in the local disk.
* 0 — The item exists only in the backup.

Note:

This return appears only if you set the exists parameter to 1.
    Enum: 1, 0

  - `result.data.fileSize` (integer)
    The size, in bytes, of the file in the backup.

Note:

The function returns this value only if the item is a file.
    Example: 199

  - `result.data.mtime` (integer)
    The file's last modification time.
    Example: 1520043240

  - `result.data.path` (string)
    The identical file path value that the system passed in the function.
    Example: "/public_html/index.php"

  - `result.data.type` (string)
    The item type stored in the backup.

* dir — A directory.
* file — A file.
* symlink — A symlink.
* unknown — An unknown file type.
    Enum: "dir", "file", "symlink", "unknown"

  - `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.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    * 1 — Success.
* 0 — Failed. Check the errors 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.


