# Get apps with access to the protected branch

From **GitHub v3 REST API**.

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

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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch.

## Parameters

### `owner`

- Location: path
- Required: true
- Type: `string`

### `repo`

- Location: path
- Required: true
- Type: `string`

### `branch`

- Location: path
- Required: true
- Type: `string`

The name of the branch.

## Responses

### `200`

Response

### `application/json`

- Type: `array`

```json
[
  {
    "created_at": "2017-07-08T16:18:44-04:00",
    "description": "",
    "events": [
      "push",
      "pull_request"
    ],
    "external_url": "https://example.com",
    "html_url": "https://github.com/apps/octoapp",
    "id": 1,
    "name": "Octocat App",
    "node_id": "MDExOkludGVncmF0aW9uMQ==",
    "owner": {
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "events_url": "https://api.github.com/orgs/github/events",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "gravatar_id": "",
      "html_url": "https://github.com/octocat",
      "id": 1,
      "login": "github",
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "repos_url": "https://api.github.com/orgs/github/repos",
      "site_admin": true,
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "type": "User",
      "url": "https://api.github.com/orgs/github"
    },
    "permissions": {
      "contents": "read",
      "issues": "write",
      "metadata": "read",
      "single_file": "write"
    },
    "slug": "octoapp",
    "updated_at": "2017-07-08T16:18:44-04:00"
  }
]
```

```json
{"items":{"$ref":"#/components/schemas/integration"},"type":"array"}
```

### `404`

Resource not found

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
```
