> For the complete documentation index, see [llms.txt](https://docs.finngen.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finngen.fi/working-in-the-sandbox/running-analyses-in-sandbox/pipelines-tool-instructions/using-google-life-sciences-api-in-sandbox.md).

# Using Google Life Sciences API in Sandbox

{% hint style="info" %}
Cloud Life Sciences will be [deprecated](https://cloud.google.com/life-sciences/docs/deprecations) on July 8, 2025. It will be replaced by [Batch](https://cloud.google.com/batch).
{% endhint %}

### Introduction

Sandbox pipelines are executed using [Cromwell](https://cromwell.readthedocs.io/). Cromwell is a scientific workflow management system that can be configured to execute jobs using different backends. In the Sandbox, Cromwell has been configured to use the Cloud Life Sciences API. The Cloud Life Sciences API can also be used directly in the sandbox, for example, to retrieve information about specific jobs.

### Preparing to use Cloud Life Sciences API in the terminal

Follow these instructions to call the Cloud Life Sciences API in your Sandbox iVM terminal.

{% hint style="info" %}
To call the Cloud Life Sciences REST API you will need to provide:

* access token
* project id
* location

The access token has a short lifetime and it is best to define it each time the REST API is called. The project id is available in the`$SANDBOX_PROJECT`environment variable. You will need to define the location of the Cloud Life Sciences API in the sandbox.
{% endhint %}

* Save the Cloud Life Sciences API location in the `$LOCATION` environmental variable by executing the following command:

```
LOCATION=europe-west4
```

### Using the Cloud Life Sciences API in the terminal

You can use the Cloud Life Sciences API to retrieve job information after you have defined the `$LOCATION` environmental variable. The REST API operations are documented in [Cloud Life Sciences REST reference](https://cloud.google.com/life-sciences/docs/reference/rest).

* You can list all running jobs (operations) by using the following command:

{% code overflow="wrap" %}

```
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" https://lifesciences.googleapis.com/v2beta/projects/$SANDBOX_PROJECT/locations/$LOCATION/operations
```

{% endcode %}

Above, we used the `$(gcloud auth print-access-token)` command to retrieve the access token.

* You will need to parse the JSON output to find information about the jobs.

{% hint style="warning" %}
Sandbox users do not currently have permission to use the Cloud Life Sciences API [run](https://cloud.google.com/life-sciences/docs/reference/rest/v2beta/projects.locations.pipelines/run) command. Please contact the humgen service desk (<humgen-servicedesk@helsinki.fi>) if you would like to use it.\\
{% endhint %}

**Further information**

* [Cloud Life Sciences REST reference](https://cloud.google.com/life-sciences/docs/reference/rest)
* [Introduction to Cloud Life Sciences](https://cloud.google.com/life-sciences/docs/concepts/introduction)
* [Long-running job](https://cloud.google.com/life-sciences/docs/how-tos/long-running-operations#api)


---

# 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.finngen.fi/working-in-the-sandbox/running-analyses-in-sandbox/pipelines-tool-instructions/using-google-life-sciences-api-in-sandbox.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.
