> For the complete documentation index, see [llms.txt](https://knowledge.illumina.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledge.illumina.com/software/general/software-general-reference_material-list/000005845.md).

# How to unlock Biosamples in BaseSpace using BaseSpace Command Line Interface (CLI)

The [BaseSpace CLI](https://developer.basespace.illumina.com/docs/content/documentation/cli/cli-overview) tool can be used to do this programmatically using the bs biosample unlock {BioSampleId} command:

For Linux/MacOS:

```
bs  biosample unlock &#123;biosampleID&#125;  
```

For Windows:

```
bs.exe biosample  unlock &#123;biosampleID&#125;  
```

**Notes:**

1. biosampleID is the ID of the biosamples to unlock.
2. There is a way to do this programmatically (unlock multiple biosamples in the project) using BaseSpace CLI.

Couple the command above with command below to loop through a list of Biosample IDs within a given project.

```
bs biosample list --project-id=&#123;Project ID&#125; --terse  
```

An example command to unlock multiple biosamples in a project:

* In Linux or Mac OS:

```
bs biosample list --project-id=&#123;Project ID&#125; --terse | xargs -I @ bs biosample unlock @  
```

* In Windows Powershell:

```
Foreach($x in (bs.exe biosample list --project-id=&#123;Project ID&#125; --terse)){bs.exe unlock biosample $x}  

```

See

{% embed url="<https://www.youtube.com/watch?v=WLAjo9aT7Ms&ab_channel=Illumina>" %}

for more information.

\
\
\ <br>

|                                                                                                                                                                                                                                                                                                                                                                 |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| *For any feedback or questions regarding this article (Illumina Knowledge Article #5845), contact Illumina Technical Support* [*techsupport@illumina.com*](mailto:techsupport@illumina.com?subject=Question%2FFeedback%20Regarding%20Illumina%20Knowledge%20Article%20#000005845%20-%20Software%20\&body=Dear%20Illumina%20Technical%20Support,%0D%0A%0D%0A)*.* |


---

# 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://knowledge.illumina.com/software/general/software-general-reference_material-list/000005845.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.
