# REST Resource: projects.locations.corpora.assets

- [Resource: Asset](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets#Asset)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets#Asset.SCHEMA_REPRESENTATION)
- [AssetGcsSource](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets#AssetGcsSource)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets#AssetGcsSource.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets#METHODS_SUMMARY)

## Resource: Asset

An asset is a resource in corpus. It represents a media object inside corpus, contains metadata and another resource annotation. Different feature could be applied to the asset to generate annotations. User could specified annotation related to the target asset.

| JSON representation |
|---|
| ``` { "name": string, "ttl": string, "assetGcsSource": { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets#AssetGcsSource`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Resource name of the asset. Form: `projects/{project_number}/locations/{locationId}/corpora/{corpus_id}/assets/{assetId}` |
| `ttl` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration` format)`` The duration for which all media assets, associated metadata, and search documents can exist. If not set, then it will using the default ttl in the parent corpus resource. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `assetGcsSource` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets#AssetGcsSource`)`` Output only. The original cloud storage source uri that is associated with this asset. |

## AssetGcsSource

The asset source is from Cloud Storage.

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

| Fields ||
|---|---|
| `gcsUri` | `string` Cloud storage uri. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/analyze` | Analyze asset to power search capability. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/clip` | Generates clips for downloading. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/create` | Creates an asset inside corpus. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/delete` | Deletes asset inside corpus. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/generateHlsUri` | Generates a uri for an HLS manifest. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/generateRetrievalUrl` | Generates a signed url for downloading the asset. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/get` | Reads an asset inside corpus. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/import` | Imports assets (images plus annotations) from a meta file on cloud storage. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets` | Index one asset for search. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/list` | Lists an list of assets inside corpus. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/patch` | Updates an asset inside corpus. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/removeIndex` | Remove one asset's index data for search. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1alpha1/projects.locations.corpora.assets/upload` | Upload asset by specifing the asset Cloud Storage uri. |