---
search:
  tags:
    - Environments
    - GET
seo:
  description: >-
    Lists the environments of one project — the second half of resolving a…
    Reference for the GET /projects/{projectId}/environments endpoint in the
    varsafe API.
sidebar:
  label: List environments in a project
  badge: GET
title: List environments in a project
type: openapi-operation
---
Lists the environments of one project — the second half of resolving a `project/environment` context before reading secrets.

`GET /projects/{projectId}/environments`

**Responses**

- `200` — Success.
- `400` — The request failed validation. \`field\` names the offending input.
- `401` — No credential was presented, or it is invalid or revoked.
- `403` — The credential is valid but lacks the required scope, role or team access.
- `404` — The resource does not exist, or is not visible to this credential.
- `429` — Rate limited. Retry after the interval named in the response.
- `500` — Unexpected server error. The body never carries internal detail.

Response example, 200:

```json
[
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
    "name": "string",
    "slug": "string",
    "color": "string",
    "sortOrder": 0,
    "isProtected": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
]
```
