List a Project's Environments

GET /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/

Lists a project's environments.

Path Parameters

organization_id_or_slug (string)
REQUIRED

The ID or slug of the organization the resource belongs to.

project_id_or_slug (string)
REQUIRED

The ID or slug of the project the resource belongs to.

Query Parameters:

visibility (string)
choices:
  • all
  • hidden
  • visible

The visibility of the environments to filter by. Defaults to visible.

Scopes

<auth_token> requires one of the following scopes:
  • project:admin
  • project:read
  • project:write
curl https://sentry.io/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/ \
 -H 'Authorization: Bearer <auth_token>'
RESPONSESCHEMA
[
  {
    "id": "1",
    "name": "Production",
    "isHidden": false
  },
  {
    "id": "2",
    "name": "Staging",
    "isHidden": true
  }
]