# Get file metadata

Launch stage: Public Preview

`HEAD /api/2.0/fs/files{file_path}`

Get the metadata of a file. The response HTTP headers contain the metadata. There is no
 response body.

API scopes: files

## Path parameters

- `file_path` (string, required)
  The absolute path of the file.
  Example: `/Volumes/my-catalog/my-schema/my-volume/directory/file.txt` : A file

## Header parameters

- `Range` (string, optional)
  The range of bytes to retrieve. The range is inclusive and zero-based, see [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110#name-range) for further details.
  Example: `bytes=0-499` : Retrieve the first 500 bytes
  Example: `bytes=500-` : Retrieve the 501st byte onwards
- `If-Unmodified-Since` (string, optional)
  Download the file only if it has not been modified since the specified timestamp. If it has, a 412 Precondition Failed error will be returned. See [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110#name-if-unmodified-since) for further details.
  Example: `Wed, 24 Jan 2024 14:10:56 GMT` : The time that the file must be unmodified since

## Responses

### 200

Request completed successfully.

#### Response headers

- `content-length` (int64): The length of the HTTP response body in bytes.
- `content-type` (string): Example: `"application/octet-stream"`.
- `last-modified` (HTTP-date): Example: `"Wed, 24 Jan 2024 14:10:56 GMT"`. The last modified time of the file in HTTP-date (RFC 7231) format.

### 206

Request successful. Partial content returned.

#### Response headers

- `content-length` (int64): The length of the HTTP response body in bytes.
- `content-range` (string): Example: `"bytes 0-499/500"`. The position of the content of the response body within the complete file. Further information about this header is available in [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110#name-content-range).
- `content-type` (string): Example: `"application/octet-stream"`.
- `last-modified` (HTTP-date): Example: `"Wed, 24 Jan 2024 14:10:56 GMT"`. The last modified time of the file in HTTP-date (RFC 7231) format.

## Response

```json
{}
```
