# See what a release holds

A release is a numbered copy of your project's files. An environment serves one release, and a release's page shows what it holds and where it is deployed.

## Before you start

You need a release. See [Publish](/docs/deployment/publish.md).

## Open a release

**Studio**

1. Open **Deployment** > **Releases**.
2. Wait until your release reads **Ready** under **Status**.
3. Open the **⋯** menu on the release's row.
4. Click **View release**. You should now see its **Version**, its **Status** and, under **File versions**, the files it holds.
5. Click **Deploy**. You should now see **Production** ticked and greyed out, as it already runs this release.
6. Leave **Staging** ticked.
7. Click **Deploy**. You should now see the deployment under **Deployments** on the release's page, on Staging.

**API**

1. Set `PROJECT` to your project's ID ([Find your IDs](/docs/authentication/api-keys.md#find-your-ids)): `export PROJECT=<id>`.
2. List the releases, newest first, with your [API key](/docs/authentication/api-keys.md). You should now see up to 20, and in `page_info.next` the cursor for the next 20, or `null` when there are no more:

```bash
curl https://api.veryfront.com/projects/$PROJECT/releases \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

3. Set `RELEASE_ID` to the `id` of the release, by its `version`: `export RELEASE_ID=<id>`. To reach older releases, list them again with `?cursor=` and that `page_info.next`.
4. Get the release. You should now see its `version` and its `asset_manifest.state`. Until the state reads `ready` the release can't be deployed: get it again until it does. If it reads `failed` or `superseded`, the build failed and it never will: stop, and publish again for a new release:

```bash
curl https://api.veryfront.com/projects/$PROJECT/releases/$RELEASE_ID \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

5. List the files it holds. You should now see up to 100 files, each with its `path`. While `page_info.next` is not null, list them again with `?cursor=` and that value:

```bash
curl https://api.veryfront.com/projects/$PROJECT/releases/$RELEASE_ID/files \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

### Try it in a sandbox

```playground
step: Setup: a project with a release | npm create -y veryfront@latest support-desk -- --template minimal --yes && cd support-desk && npx veryfront push && curl -fsS -X POST https://api.veryfront.com/projects/$VERYFRONT_PROJECT_ID/releases -H "Authorization: Bearer $VERYFRONT_API_KEY" -H "Content-Type: application/json" -d '{"branch_reference":"main"}'
step: Set PROJECT | export PROJECT=$VERYFRONT_PROJECT_ID
step: List the releases | curl https://api.veryfront.com/projects/$PROJECT/releases -H "Authorization: Bearer $VERYFRONT_API_KEY"
step: Set RELEASE_ID | export RELEASE_ID=$(curl -s https://api.veryfront.com/projects/$PROJECT/releases -H "Authorization: Bearer $VERYFRONT_API_KEY" | jq -r '.data[] | select(.version == "0.0.1") | .id')
step: Get the release | curl https://api.veryfront.com/projects/$PROJECT/releases/$RELEASE_ID -H "Authorization: Bearer $VERYFRONT_API_KEY"
step: Get it again until it is ready, failed or superseded | while S=$(curl -s https://api.veryfront.com/projects/$PROJECT/releases/$RELEASE_ID -H "Authorization: Bearer $VERYFRONT_API_KEY" | jq -r .asset_manifest.state); [ "$S" != ready ] && [ "$S" != failed ] && [ "$S" != superseded ]; do sleep 3; done; echo "$S"; [ "$S" = ready ]
check: curl -s https://api.veryfront.com/projects/$PROJECT/releases/$RELEASE_ID/files -H "Authorization: Bearer $VERYFRONT_API_KEY" | jq -r '.data[].path'
expect: app/page.tsx
```

To deploy it, see [Roll back](/docs/deployment/rollback.md).

## With MCP

1. Call `veryfront__list_releases` with `"project_reference": "my-project"`. The project reference is its slug or its ID. It worked when the answer lists your release with its `version`. Take the `id` of the one you want. While `page_info.next` is not null, call it again with that value as `cursor` to reach older releases.
2. Call `veryfront__get_release` with the same `project_reference` and that `id` as `release_reference`. It worked when the answer holds the release's `version`. Until its `asset_manifest.state` reads `ready` it can't be deployed: call it again until it does. If it reads `failed` or `superseded`, it never will: stop, and publish again for a new release.
3. Call `veryfront__list_release_files` with the same two. It worked when the answer lists the release's files. While `page_info.next` is not null, call it again with that value as `cursor` for the rest.

## Next steps

* [Roll back](/docs/deployment/rollback.md)
* [Set variables](/docs/runtime/environments.md)
