Updates an asset. There are a number of constraints on the update operation:
- Only the
title
,description
,startTime
,endTime
, andproperties
fields of the asset can be updated. - Naming
"properties"
inupdateMask
results in all user-defined properties of the asset being replaced by the properties inasset
. - Naming
"title"
,"description"
,"startTime"
or"endTime"
inupdateMask
and not providing a value inasset
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 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
updateMask
will result in the asset's timestamps and properties all being replaced by the values inasset
.
HTTP request
PATCH https://earthengine.googleapis.com/v1alpha/{asset.name=projects/*/assets/**}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
asset. |
The name of the asset. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "asset": { "cloudStorageLocation": { "uris": [ string ] }, "gcsLocation": { "uris": [ string ] }, "featureViewAssetLocation": { "assetOptions": { object ( |
Fields | |
---|---|
asset. |
The type of the asset. |
asset. |
The ID of the asset. Equivalent to |
asset. |
The last-modified time of the asset. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
asset.title |
The title of the asset. |
asset.description |
The description of the asset. |
asset. |
Key/value properties associated with the asset. |
asset. |
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. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
asset. |
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). A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
asset. |
The spatial footprint associated with the asset, if any, as a GeoJSON geometry object (see RFC 7946). |
asset. |
Information about the data bands of the image asset. Omitted for non-image assets. |
asset. |
The size of a leaf asset (e.g. an image) in bytes. |
asset. |
The number of features in the asset, if applicable. |
asset. |
The quota information associated with the folder asset, if any. Returned for top-level user-owned folder assets (e.g. "users/*" or "projects/*"). |
asset. |
The tilesets backing this image. Only present for external images, whose pixels are retrieved from storage not owned by Earth Engine. |
update |
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. |
The location of this asset on Cloud Storage. For VCOGs (Virtual Cloud Optimized GeoTIFFs). |
asset.gcsLocation |
The location of this asset on Cloud Storage. |
asset. |
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/earthengine
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.