- [HTTP request](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/fetchPullRequestList#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/fetchPullRequestList#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/fetchPullRequestList#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/fetchPullRequestList#body.request_body)
- [Response body](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/fetchPullRequestList#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/fetchPullRequestList#body.FetchGitRepositoryLinkPullRequestListResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/fetchPullRequestList#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/fetchPullRequestList#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/fetchPullRequestList#try-it)

Fetches a list of Pull Requests from the remote repository.

### HTTP request

`GET https://developerconnect.googleapis.com/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchPullRequestList`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The GitRepositoryLink resource name in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. |

### Query parameters

| Parameters ||
|---|---|
| `filter` | `string` Optional. A filter expression that filters the pull requests returned in the response. Only a single equality comparison on `state` is supported, for example `state = "OPEN"`. Supported values are `OPEN`, `CLOSED`, and `MERGED`. `DECLINED` is only supported for SCM providers that support declining pull requests, and returns `INVALID_ARGUMENT` for GitHub, GitHub Enterprise, GitLab, and GitLab Enterprise. Other values or expressions return `INVALID_ARGUMENT`. Defaults to `state = "OPEN"` if unspecified. |
| `pageSize` | `integer` Optional. Number of results to return in the list. Default is 20. Max is 100. A page may contain fewer than `pageSize` results even when more results are available; use `nextPageToken` to check for more pages. |
| `pageToken` | `string` Optional. A page token, received from a previous `gitRepositoryLinks.fetchPullRequestList` call. Provide this to retrieve the subsequent page. |

### Request body

The request body must be empty.

### Response body

Response message for gitRepositoryLinks.fetchPullRequestList.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "pullRequests": [ { object (`https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/PullRequest`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `pullRequests[]` | ``object (`https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/PullRequest`)`` The list of pull requests. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `developerconnect.gitRepositoryLinks.fetchPullRequestList`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).