# REST Resource: projects.locations.corpora.collections

- [Resource: Collection](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections#Collection)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections#Collection.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections#METHODS_SUMMARY)

## Resource: Collection

A collection is a resource in a corpus. It serves as a container of references to original resources.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Resource name of the collection. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` |
| `displayName` | `string` Optional. The collection name for displaying. The name can be up to 256 characters long. |
| `description` | `string` Optional. Description of the collection. Can be up to 25000 characters long. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections/addCollectionItem` | Adds an item into a Collection. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections/create` | Creates a collection. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections/delete` | Deletes a collection. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections/get` | Gets a collection. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections/list` | Lists collections inside a corpus. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections/patch` | Updates a collection. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections/removeCollectionItem` | Removes an item from a collection. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.collections/viewCollectionItems` | View items inside a collection. |