# Method: projects.repos.list

- [HTTP request](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/list#body.request_body)
- [Response body](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/list#body.ListReposResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/list#body.aspect)
- [Try it!](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/list#try-it)

Returns all repos belonging to a project. The sizes of the repos are not set by repos.list. To get the size of a repo, use repos.get.

### HTTP request

`GET https://sourcerepo.googleapis.com/v1/{name=projects/*}/repos`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` The project ID whose repos should be listed. Values are of the form `projects/<project>`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `source.repos.list` |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Maximum number of repositories to return; between 1 and 500. If not set or zero, defaults to 100 at the server. |
| `pageToken` | `string` Resume listing repositories where a prior ListReposResponse left off. This is an opaque token that must be obtained from a recent, prior ListReposResponse's nextPageToken field. |

### Request body

The request body must be empty.

### Response body

Response for repos.list. The size is not set in the returned repositories.

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

| JSON representation |
|---|
| ``` { "repos": [ { object (`https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos#Repo`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `repos[]` | ``object (`https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos#Repo`)`` The listed repos. |
| `nextPageToken` | `string` If non-empty, additional repositories exist within the project. These can be retrieved by including this value in the next ListReposRequest's pageToken field. |

### Authorization scopes

Requires the following OAuth scope:

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

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