> For the complete documentation index, see [llms.txt](https://documentation.dnanexus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.dnanexus.com/admin/trusted-research-environments/managing-tre-lifecycle.md).

# Manage TRE Lifecycle States

Publish, deactivate, reactivate, and delete a Trusted Research Environment, and update its resource inventory after launch.

{% hint style="info" %}
Apollo and Trusted Research Environments licenses are required to use Trusted Research Environments on the DNAnexus Platform. [Contact DNAnexus Sales](mailto:sales@dnanexus.com) for more information.
{% endhint %}

TRE lifecycle operations cover the state changes TRE Admins perform after creating a Trusted Research Environment: transitioning between states, updating the resource inventory, and deleting a TRE. For an overview of the three lifecycle states and what configuration is possible in each, see [Managing Trusted Research Environments](/admin/trusted-research-environments.md#lifecycle-operations).

## Publish a TRE

Publishing transitions a TRE from **Draft** to **Active** state. For the full publish procedure and pre-publish checklist, see [Step 8 in creating a TRE](/admin/trusted-research-environments/creating-a-tre.md#step-8-publish-the-research-environment).

## Deactivate a TRE

Deactivating transitions a TRE from **Active** to **Maintenance** state. While in Maintenance state, the TRE remains visible to Authorized Users in **Data Resources** > **Resource Center** but is marked as under maintenance, and new data access requests cannot be submitted. Existing approved requests and active projects are not affected.

Deactivate a TRE when you need to update the resource inventory with a new version.

1. In your org details, navigate to the **TRE** tab.
2. Click the TRE you want to deactivate.
3. Click **Administrative Actions** (gear icon) at the top right.
4. Select **Deactivate Environment**.
5. Click **Confirm and Deactivate**.

## Reactivate a TRE

Reactivating transitions a TRE from **Maintenance** back to **Active** state. The TRE becomes visible again to Authorized Users, and new data access requests can be submitted.

1. In your org details, navigate to the **TRE** tab.
2. Click the TRE you want to reactivate.
3. Click **Administrative Actions** (gear icon) at the top right.
4. Select **Reactivate Environment**.
5. Review the confirmation message.
6. Click **Confirm and Reactivate**.

## Update Data Access Policies

Data access policies control the security restrictions enforced on all researcher projects in this TRE. You can update them at any time regardless of lifecycle state. Changes take effect immediately on all existing and future projects.

1. In your org details, navigate to the **TRE** tab.
2. Click the TRE you want to edit.
3. Under **Features & Policies**, click **Configure Policies**.
4. For each policy, select an enforcement option. For a description of the three options, see [planning data access policies](/admin/trusted-research-environments/planning-a-tre.md#plan-your-data-access-policies).
5. Click **Save**.

## Update the Resource Inventory

The resource inventory is locked while a TRE is Active. To update it — for example, to publish a new version of your data resources — you must first deactivate the TRE.

1. [Deactivate the TRE](#deactivate-a-tre) to enter **Maintenance** state.
2. Navigate to **Resource Inventory** and click **Configure Resource Inventory**.
3. Update the **Version** string to reflect the new release, for example `2.0.0`.
4. Update the `project-xxxx:file-yyyy` or `project-xxxx:record-yyyy` identifiers for any changed resources. For a file-only inventory, you can add or replace the optional closed [Participant IDs (PID) CSV file](/admin/trusted-research-environments/preparing-resource-inventory-for-file-only-tre.md#prepare-the-participant-ids-pid-csv-optional) to match the revised File Inventory.
5. [Reactivate the TRE](#reactivate-a-tre) to make the updated inventory available.

Updating the resource inventory has the following effects on participant pseudonymization:

* **Existing mappings preserved** — Previously assigned PID-to-EID pairs remain unchanged for participants present in previous releases.
* **New participant mappings** — Participants added in the revised inventory receive newly generated EIDs on subsequent dispensals.
* **Updated mapping artifact** — Subsequent data dispensals generate an updated mapping CSV artifact reflecting all assigned mappings.

{% hint style="warning" %}
Data Governance settings such as pseudonymization cannot be enabled or changed once the TRE has left **Draft** state. You cannot enable or disable pseudonymization while the environment is in **Maintenance** state.
{% endhint %}

Contact [DNAnexus Professional Services](https://www.dnanexus.com/professional-services) for assistance preparing updated File Inventory and Data Collections files.

## Download EID Mapping Artifacts

When participant pseudonymization is enabled, TRE Admins can retrieve a preauthenticated download URL of the `eid_mapping.csv` artifact generated for a dispensed researcher project using the [`/system/downloadEIDMapping`](/developer/api/system-methods.md#api-method-system-downloadeidmapping) API method:

```shell
dx api system downloadEIDMapping '{"project": "project-xxxx"}'
```

The command returns a JSON object containing a `url` field valid for a limited duration to download `eid_mapping.csv` for the specified dispensed project.

The downloaded CSV file contains the header `dnx_eid,eid` followed by one row per mapped participant, where `dnx_eid` is the source PID and `eid` is the mapped pseudonymized EID.

A mapping artifact is available only after the first successful data dispensal for that project. Only TRE Admins using full-scope API tokens can call `/system/downloadEIDMapping`. Researchers and non-admin users do not receive access to mapping files.

## Delete a TRE

You can delete a TRE only when it is in **Draft** or **Maintenance** state, and only if no data access requests exist for it.

{% hint style="danger" %}
Deleting a TRE is permanent. It cannot be recovered.
{% endhint %}

If data access requests exist, the delete action is disabled.

1. In your org details, navigate to the **TRE** tab.
2. Click the TRE you want to delete.
3. Click **Administrative Actions** (gear icon) at the top right.
4. Select **Delete Environment**.
5. Click **Confirm and Delete**.


---

# 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://documentation.dnanexus.com/admin/trusted-research-environments/managing-tre-lifecycle.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.
