---
title: "List deployment branch policies"
method: GET
path: "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"
tags: ["repos"]
---

# List deployment branch policies

`GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies`

Lists the deployment branch policies for an environment.

Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.

## Path parameters

- `owner` string, required
- `repo` string, required
- `environment_name` string, required

## Query parameters

- `per_page` integer
- `page` integer

## Response `200`

Response

- object
  - `total_count` integer, required — The number of deployment branch policies for the environment.
  - `branch_policies` DeploymentBranchPolicy[], required
    - `id` integer — The unique identifier of the branch policy.
    - `node_id` string
    - `name` string — The name pattern that branches must match in order to deploy to the environment.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-6.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-6/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-6/versions/15db3fa0759b/schema)
