Updates an asset. There are a number of constraints on the update operation:

- Only the `title`, `description`, `startTime`, `endTime`, and `properties` fields of the asset can be updated.
- Naming `"properties"` in `updateMask` results in all user-defined properties of the asset being replaced by the properties in `asset`.
- Naming `"title"`, `"description"`, `"startTime"` or `"endTime"` in `updateMask` and not providing a value in `asset` results in that field becoming unset.
- It is possible to update individual properties by naming them in `updateMask`, like `"properties.my_property_name"`. The property's value will be set to the corresponding value from `asset.properties`. If there is no corresponding value in `asset.properties`, or if there is a value but it is a `NullValue`, the property will be deleted from the asset.
- Properties can be set only to string or number values, or deleted by specifying a `NullValue`.
- Supplying an empty `updateMask` will result in the asset's timestamps and properties all being replaced by the values in `asset`.

### HTTP request

`PATCH https://earthengine.googleapis.com/v1/{asset.name=projects/*/assets/**}`

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

### Path parameters

| Parameters ||
|---|---|
| `asset.name` | `string` The name of the asset. `name` is of the format "projects/\*/assets/\*\*" (e.g. "projects/earthengine-legacy/assets/users//"). |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "asset": { "cloudStorageLocation": { "uris": [ string ] }, "featureViewAssetLocation": { "assetOptions": { object (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.FeatureViewOptions`) } }, "type": enum (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.Type_1`), "name": string, "id": string, "updateTime": string, "properties": { "fields": { string: value, ... } }, "startTime": string, "endTime": string, "geometry": { "fields": { string: value, ... } }, "bands": [ { "id": string, "dataType": { object (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.PixelDataType`) }, "grid": { object (`https://developers.google.com/earth-engine/reference/rest/v1/PixelGrid`) }, "pyramidingPolicy": enum (`https://developers.google.com/earth-engine/reference/rest/Shared.Types/PyramidingPolicy`), "missingData": { object (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.MissingData`) } } ], "sizeBytes": string, "featureCount": string, "quota": { "sizeBytes": string, "maxSizeBytes": string, "assetCount": string, "maxAssets": string }, "tilesets": [ { "id": string, "sources": [ { object (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.ImageSource`) } ], "dataType": enum (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.DataType`), "crs": string } ] }, "updateMask": string } ``` |

| Fields ||
|---|---|
| `asset.type` | ``enum (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.Type_1`)`` The type of the asset. |
| `asset.id` | `string` The ID of the asset. Equivalent to `name` without the "projects/\*/assets/" prefix (e.g. "users//"). Note that this is intended for display purposes only. It should not be used as an input to another operation. Use `name` instead. |
| `asset.updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` The last-modified time of the asset. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `asset.properties` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Key/value properties associated with the asset. |
| `asset.startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` The timestamp associated with the asset, if any, e.g. the time at which a satellite image was taken. For assets that correspond to an interval of time, such as average values over a month or year, this timestamp corresponds to the start of that interval. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `asset.endTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` For assets that correspond to an interval of time, such as average values over a month or year, this timestamp corresponds to the end of that interval (exclusive). Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `asset.geometry` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` The spatial footprint associated with the asset, if any, as a GeoJSON geometry object (see RFC 7946). |
| `asset.bands[]` | ``object (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.ImageBand`)`` Information about the data bands of the image asset. Omitted for non-image assets. |
| `asset.sizeBytes` | `string (https://developers.google.com/discovery/v1/type-format format)` The size of a leaf asset (e.g. an image) in bytes. |
| `asset.featureCount` | `string (https://developers.google.com/discovery/v1/type-format format)` The number of features in the asset, if applicable. |
| `asset.quota` | ``object (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.FolderQuota`)`` The quota information associated with the folder asset, if any. Returned for top-level user-owned folder assets (e.g. "users/\*" or "projects/\*"). |
| `asset.tilesets[]` | ``object (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.Tileset`)`` The tilesets backing this image. Only present for external images, whose pixels are retrieved from storage not owned by Earth Engine. |
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The update mask specifying which fields of the asset to update. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |
| Information about where and how the raster tiles are stored. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `asset.cloudStorageLocation (deprecated)` | ``object (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.CloudStorageLocation`)`` Deprecated. Use `ImportExternalImage` instead. See <https://developers.google.com/earth-engine/Earth_Engine_asset_from_cloud_geotiff> for more details. |
| `asset.featureViewAssetLocation` | ``object (`https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset.FeatureViewLocation`)`` The location of this FeatureView in EE. |
| End of mutually exclusive fields. ||

### Response body

If successful, the response body contains an instance of `https://developers.google.com/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset`.

### Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).