# REST Resource: projects.locations.corpora.indexes

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

## Resource: Index

An Index is a resource in Corpus. It contains an indexed version of the assets and annotations. When deployed to an endpoint, it will allow users to search the Index.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "state": enum (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.indexes#State`), "createTime": string, "updateTime": string, "deployedIndexes": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.indexes#DeployedIndexReference`) } ], // Union field `asset_filter` can be only one of the following: "entireCorpus": boolean // End of list of possible types for union field `asset_filter`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Resource name of the Index resource. Format: `projects/{project_number}/locations/{locationId}/corpora/{corpus_id}/indexes/{indexId}` |
| `displayName` | `string` Optional. Optional user-specified display name of the index. |
| `description` | `string` Optional. Optional description of the index. |
| `state` | ``enum (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.indexes#State`)`` Output only. State of the index. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. The create timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. The update timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `deployedIndexes[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.indexes#DeployedIndexReference`)`` Output only. References to the deployed index instance. Index of VIDEO_ON_DEMAND corpus can have at most one deployed index. Index of IMAGE corpus can have multiple deployed indexes. |
| Union field `asset_filter`. Specifies how assets are selected for this index. Default to entire_corpus if unspecified. Behavior in UpdateIndex: if update_mask includes one of the asset_filter field paths, the index will be rebuilt with latest assets, including their analyzed data and annotations. `asset_filter` can be only one of the following: ||
| `entireCorpus` | `boolean` Include all assets under the corpus. |

## State

Enum representing the different states through which an Index might cycle during its lifetime.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The default value. Should not be used. |
| `CREATING` | State CREATING. |
| `CREATED` | State CREATED. |
| `UPDATING` | State UPDATING. |

## DeployedIndexReference

Points to a DeployedIndex.

| JSON representation |
|---|
| ``` { "indexEndpoint": string } ``` |

| Fields ||
|---|---|
| `indexEndpoint` | `string` Immutable. A resource name of the IndexEndpoint. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.indexes/create` | Creates an Index under the corpus. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.indexes/delete` | Delete a single Index. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.indexes/get` | Gets the details of a single Index under a Corpus. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.indexes/list` | List all Indexes in a given Corpus. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.indexes/patch` | Updates an Index under the corpus. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.indexes/viewAssets` | Lists assets inside an index. |