---
title: "Get access restrictions"
method: GET
path: "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions"
tags: ["repos"]
---

# Get access restrictions

`GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions`

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

Lists who has access to this protected branch.

**Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories.

## Path parameters

- `owner` string, required
- `repo` string, required
- `branch` string, required

## Response `200`

Response

- BranchRestrictionPolicy — Branch Restriction Policy
  - `url` string, uri, required
  - `users_url` string, uri, required
  - `teams_url` string, uri, required
  - `apps_url` string, uri, required
  - `users` object[], required
    - `login` string
    - `id` integer
    - `node_id` string
    - `avatar_url` string
    - `gravatar_id` string
    - `url` string
    - `html_url` string
    - `followers_url` string
    - `following_url` string
    - `gists_url` string
    - `starred_url` string
    - `subscriptions_url` string
    - `organizations_url` string
    - `repos_url` string
    - `events_url` string
    - `received_events_url` string
    - `type` string
    - `site_admin` boolean
  - `teams` object[], required
    - `id` integer
    - `node_id` string
    - `url` string
    - `html_url` string
    - `name` string
    - `slug` string
    - `description` string, nullable
    - `privacy` string
    - `permission` string
    - `members_url` string
    - `repositories_url` string
    - `parent` string, nullable
  - `apps` object[], required
    - `id` integer
    - `slug` string
    - `node_id` string
    - `owner` object
      - `login` string
      - `id` integer
      - `node_id` string
      - `url` string
      - `repos_url` string
      - `events_url` string
      - `hooks_url` string
      - `issues_url` string
      - `members_url` string
      - `public_members_url` string
      - `avatar_url` string
      - `description` string
      - `gravatar_id` string
      - `html_url` string
      - `followers_url` string
      - `following_url` string
      - `gists_url` string
      - `starred_url` string
      - `subscriptions_url` string
      - `organizations_url` string
      - `received_events_url` string
      - `type` string
      - `site_admin` boolean
    - `name` string
    - `description` string
    - `external_url` string
    - `html_url` string
    - `created_at` string
    - `updated_at` string
    - `permissions` object
      - `metadata` string
      - `contents` string
      - `issues` string
      - `single_file` string
    - `events` string[]

## Other responses

- `404` — Resource not found

---

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