---
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.

OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

## 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 or tag policy.
    - `node_id` string
    - `name` string — The name pattern that branches or tags must match in order to deploy to the environment.
    - `type` 'branch' | 'tag' — Whether this rule targets a branch or tag.

---

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