AI-generated Key Takeaways
-
Assets can be updated by patching their
title,description,startTime,endTime, andproperties. -
The
updateMaskfield specifies which fields to update, and not providing a value for a specified field will unset it. -
Individual properties can be updated by naming them in the
updateMaskusing the format"properties.my_property_name". -
Properties can only be set to string or number values, or deleted using a
NullValue. -
An empty
updateMaskwill replace the asset's timestamps and all properties with values from the provided asset data.
Updates an asset. There are a number of constraints on the update operation:
- Only the
title,description,startTime,endTime, andpropertiesfields of the asset can be updated. - Naming
"properties"inupdateMaskresults in all user-defined properties of the asset being replaced by the properties inasset. - Naming
"title","description","startTime"or"endTime"inupdateMaskand not providing a value inassetresults 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 fromasset.properties. If there is no corresponding value inasset.properties, or if there is a value but it is aNullValue, 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
updateMaskwill result in the asset's timestamps and properties all being replaced by the values inasset.
HTTP request
PATCH https://earthengine.googleapis.com/v1/{asset.name=projects/*/assets/**}
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
asset.name |
The name of the asset. |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "asset": { "cloudStorageLocation": { "uris": [ string ] }, "featureViewAssetLocation": { "assetOptions": { object ( |
| Fields | |
|---|---|
asset.type |
The type of the asset. |
asset.id |
The ID of the asset. Equivalent to |
asset.updateTime |
The last-modified time of the asset. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
asset.properties |
Key/value properties associated with the asset. |
asset.startTime |
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 uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
asset.endTime |
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 uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
asset.geometry |
The spatial footprint associated with the asset, if any, as a GeoJSON geometry object (see RFC 7946). |
asset.bands[] |
Information about the data bands of the image asset. Omitted for non-image assets. |
asset.sizeBytes |
The size of a leaf asset (e.g. an image) in bytes. |
asset.featureCount |
The number of features in the asset, if applicable. |
asset.quota |
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[] |
The tilesets backing this image. Only present for external images, whose pixels are retrieved from storage not owned by Earth Engine. |
updateMask |
The update mask specifying which fields of the asset to update. This is a comma-separated list of fully qualified names of fields. Example: |
Union field location. Information about where and how the raster tiles are stored. location can be only one of the following: |
|
asset.cloudStorageLocation |
Deprecated. Use |
asset.featureViewAssetLocation |
The location of this FeatureView in EE. |
Response body
If successful, the response body contains an instance of EarthEngineAsset.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/earthenginehttps://www.googleapis.com/auth/cloud-platform
For more information, see the OAuth 2.0 Overview.