> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
