# samples files list

## Synopsis

### List Sample Files

```shell
omics samples files list --sample-id=SAMPLE_ID
[--max-results=NUMBER]
[--page=NUMBER]
[--page-size=NUMBER]
[--sort=SORT_STRING]
[--platform=STRING]
[--platform-type=PLATFORM_TYPE]
[--storage=STRING]
[--instrument=STRING]
[--search=STRING]
```

## Description

List files associated with a given sample ID. This command retrieves files and their details for the specified sample, allowing you to filter and sort the results.

## Examples

List all files for a specific sample:

```shell
omics samples files list --sample-id sample-123
```

List files for a specific sample with pagination and sorting:

```shell
omics samples files list --sample-id sample-123 --page 2 --page-size 5 --sort creation_date:DESC
```

## Flags

### `--sample-id`=`STRING`

The ID of the sample for which the files will be listed. This flag is required.

### `--namespace`=`STRING`

An optional flag to define the namespace to connect to. By default, the namespace is extracted from the user's credentials.

### `--max-results`=`NUMBER`

Limit the maximum number of results printed to the console.

### `--page`=`NUMBER`

Used to set the offset page number. This allows for jumping to an arbitrary page of results.

### `--page-size`=`NUMBER`

Used to set the number of results returned per page (default 100).

### `--sort`=`SORT_STRING`

Used to sort the files by a set of given properties and directions. The `SORT_STRING` consists of multiple properties to order by, in the form `column(:direction)?(;(column(:direction)?)*`. The direction of the ordering is optional, and if it is omitted, the default ordering is ascending.

Valid Directions: `ASC`, `DESC`

Examples: `created_at:ASC`

### `--platform`=`STRING`

Filter the files by the platform ID that generated them.

### `--platform-type`=`PLATFORM_TYPE`

Filter the files by the platform type

### `--storage`=`STRING`

Filter the files by their storage ID.

### `--instrument`=`STRING`

Filter the files by the instrument ID that generated them.

### `--search`=`STRING`

Search for files that contain the specified string in their path.
