---
title: "List the deployment environments."
method: POST
path: "/filter/environments"
tags: ["filter", "default"]
---

# List the deployment environments.

`POST /filter/environments`

## Request

- Base URL: `{{ server_url }}/v1`
- URL: `{{ server_url }}/v1/filter/environments`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/athenian/apis/title/docs/filter/environments/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- FilterEnvironmentsRequest: Request body of `/filter/environments`. Filters for deployment environments.
  - `account` integer, required: Account ID.
  - `repositories` RepositoryID[]: At least one repository in the list must be deployed in `[date_from, date_to)`.
  - `date_from` string, date, required: Date from when to start looking for deployments.
  - `date_to` string, date, required: Date until which to look for deployments.
  - `timezone` integer: Local time zone offset in minutes, used to adjust `date_from` and `date_to`.

## Response `200`

Deployment environments that satisfy the specified filters.

- FilteredEnvironment[]: List of distinct deployment environments.
  - `deployments_count` integer, required: Number of deployments (successful or not) in the specified time interval.
  - `last_conclusion` 'SUCCESS' | 'FAILURE' | 'CANCELLED', required: The conclusion of the most recent deployment before `date_to`.
  - `name` string, required: Name of the environment.
  - `repositories` RepositoryID[], required: List of repositories which had at least one deployment between date_from and date_to.

## Other responses

- `400`: The request is invalid.
- `404`: The specified account does not exist or the user is not a member.
- `422`: The account hasn't submitted any deployment notifications.

---

[API](https://skmtc.dev/athenian/apis/title.md) - [All operations](https://skmtc.dev/athenian/apis/title/llms.txt) - [OpenAPI document](https://skmtc.dev/athenian/apis/title/revisions/110c9f7cffdd?raw)
