# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.omics.ai/products/command-line-interface/reference/workbench/samples-files-list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
