# Method: projects.locations.corpora.list

- [HTTP request](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#body.request_body)
- [Response body](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#body.ListCorporaResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#body.aspect_1)

Lists all corpora in a project.

### HTTP request

`GET https://visionai.googleapis.com/v1alpha1/{parent=projects/*/locations/*}/corpora`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The resource name of the project from which to list corpora. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Requested page size. API may return fewer results than requested. If negative, INVALID_ARGUMENT error will be returned. If unspecified or 0, API will pick a default size, which is 10. If the requested page size is larger than the maximum size, API will pick use the maximum size, which is 20. |
| `pageToken` | `string` A token identifying a page of results for the server to return. Typically obtained via `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#body.ListCorporaResponse.FIELDS.next_page_token` of the previous `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#google.cloud.visionai.v1alpha1.Warehouse.ListCorpora` call. |
| `filter` | `string` The filter applied to the returned corpora list. Only the following restrictions are supported: `type=<Corpus.Type>`, `type!=<Corpus.Type>`. |

### Request body

The request body must be empty.

### Response body

Response message for corpora.list.

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

| JSON representation |
|---|
| ``` { "corpora": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora#Corpus`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `corpora[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora#Corpus`)`` The corpora in the project. |
| `nextPageToken` | `string` A token to retrieve next page of results. Pass to `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora/list#body.QUERY_PARAMETERS.page_token` to obtain that page. |

### 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/).

### IAM Permissions

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

- `visionai.corpora.list`

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