Announcement: All noncommercial projects registered to use Earth Engine beforeApril 15, 2025 mustverify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.

Method: projects.assets.patch

  • Assets can be updated by patching theirtitle,description,startTime,endTime, andproperties.

  • TheupdateMask field 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 theupdateMask using the format"properties.my_property_name".

  • Properties can only be set to string or number values, or deleted using aNullValue.

  • An emptyupdateMask will 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 thetitle,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 inupdateMask, 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 aNullValue.
  • Supplying an emptyupdateMask will 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 usesgRPC Transcoding 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 (FeatureViewOptions)}},"type":enum (Type),"name":string,"id":string,"updateTime":string,"properties":{"fields":{string:value,...}},"startTime":string,"endTime":string,"geometry":{"fields":{string:value,...}},"bands":[{"id":string,"dataType":{object (PixelDataType)},"grid":{object (PixelGrid)},"pyramidingPolicy":enum (PyramidingPolicy),"missingData":{object (MissingData)}}],"sizeBytes":string,"featureCount":string,"quota":{"sizeBytes":string,"maxSizeBytes":string,"assetCount":string,"maxAssets":string},"tilesets":[{"id":string,"sources":[{object (ImageSource)}],"dataType":enum (DataType),"crs":string}]},"updateMask":string}
Fields
asset.type

enum (Type)

The type of the asset.

asset.id

string

The ID of the asset. Equivalent toname 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. Usename instead.

asset.updateTime

string (Timestamp format)

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:"2014-10-02T15:01:23Z","2014-10-02T15:01:23.045123456Z" or"2014-10-02T15:01:23+05:30".

asset.properties

object (Struct format)

Key/value properties associated with the asset.

asset.startTime

string (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 uses 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 (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 uses 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 (Struct format)

The spatial footprint associated with the asset, if any, as a GeoJSON geometry object (see RFC 7946).

asset.bands[]

object (ImageBand)

Information about the data bands of the image asset. Omitted for non-image assets.

asset.sizeBytes

string (int64 format)

The size of a leaf asset (e.g. an image) in bytes.

asset.featureCount

string (int64 format)

The number of features in the asset, if applicable.

asset.quota

object (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 (Tileset)

The tilesets backing this image. Only present for external images, whose pixels are retrieved from storage not owned by Earth Engine.

updateMask

string (FieldMask 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".

Union fieldlocation. Information about where and how the raster tiles are stored.location can be only one of the following:
asset.cloudStorageLocation
(deprecated)

object (CloudStorageLocation)

Deprecated. Useimage.importExternal instead. Seehttps://developers.google.com/earth-engine/Earth_Engine_asset_from_cloud_geotiff for more details.

asset.featureViewAssetLocation

object (FeatureViewLocation)

The location of this FeatureView in EE.

Response body

If successful, the response body contains an instance ofEarthEngineAsset.

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 theOAuth 2.0 Overview.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-03-06 UTC.