> For the complete documentation index, see [llms.txt](https://docs.omics.ai/products/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.omics.ai/products/command-line-interface/reference/workbench/samples-attributes-get.md).

# samples attributes get

Print a sample's custom attributes

## Synopsis

```shell
omics workbench samples attributes get SAMPLE_ID
  [--namespace=STRING]
```

## Description

Print a sample's custom attributes exactly as stored, or `{}` when the sample has none.

Custom attributes are free-form JSON attached to a sample — lab-supplied data the sample schema does not model, such as a barcode map or a kit lot number. They are separate from the sample's pedigree and phenotypes, and are not included in [samples describe](/products/command-line-interface/reference/workbench/samples-describe.md).

The document is printed unchanged rather than reformatted, so nulls, nested objects and numeric types survive and the output can be piped straight into other tools.

## Examples

Print a sample's attributes:

```shell
omics workbench samples attributes get HG002
```

```json
{"kit_lot": "A7-2291", "passed_qc": true, "operator": null}
```

Read a single value with `jq`:

```shell
omics workbench samples attributes get HG002 | jq -r '.kit_lot'
```

Save the attributes, edit them, and write them back:

```shell
omics workbench samples attributes get HG002 > bag.json
omics workbench samples attributes set HG002 @bag.json
```

## Positional Arguments

### `SAMPLE_ID`

The ID of the sample. Sample IDs can be retrieved from the [samples list](/products/command-line-interface/reference/workbench/samples-list.md) command.

## Flags

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

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.omics.ai/products/command-line-interface/reference/workbench/samples-attributes-get.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
