公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
Method: projects.listAssets
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://earthengine.googleapis.com/v1/{parent=projects/*}:listAssets
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
必需。要列出的容器素材资源的名称。parent 的格式为“projects/*”或“projects/*/assets/**”(例如“projects/[PROJECT]”或“projects/earthengine-legacy/assets/users/[USER]/[ASSET]”。所有用户拥有的资产目前都位于项目“earthengine-legacy”下(例如,“projects/earthengine-legacy/assets/users/foo/bar”)。所有其他资产均位于项目“earthengine-public”下(例如“projects/earthengine-public/assets/LANDSAT”)。如果指定了“projects/earthengine-legacy”,则响应将包含请求用户拥有的所有顶级文件夹的列表。
必须对指定的资源 parent 具有以下一项或多项 IAM 权限才能进行授权:
earthengine.assets.get
earthengine.assets.list
|
查询参数
参数 |
pageSize |
integer
每页的结果数上限。服务器返回的素材资源数量可能少于请求的数量。如果未指定,默认每页数据大小取决于 EarthEngineAssetView,限制越严格的视图,上限越高。
|
pageToken |
string
标识服务器应返回的结果页面的令牌。 通常,这是上次调用 projects.listAssets 方法返回的 ListAssetsResponse.next_page_token 值。
|
filter |
string
指定过滤器(如果有)。过滤条件仅应用于 ImageCollection 素材资源,系统会忽略 Folder 素材资源。 系统会识别 startTime 、endTime 字段以及 properties 的成员。可使用自定义函数 intersects(str) ,以按几何图形进行过滤。 日期过滤条件示例:
"startTime>\"2020-01-01T00:00:00+00:00\" AND
endTime<\"2020-02-01T00:00:00+00:00\""
属性过滤条件示例:
"properties.CLOUDY_PIXEL_PERCENTAGE<30"
几何图形过滤器示例:
"intersects(\"{'type':'Point','coordinates':[1,2]}\")"
"intersects(\"{\\\"type\\\":\\\"Point\\\",\\\"coordinates\\\":[1,2]}\")"
如需详细了解过滤器语言,请参阅 https://google.aip.dev/160。
|
view |
enum (EarthEngineAssetView )
指定应在响应中返回 EarthEngineAsset 资源的哪些部分。仅适用于 ImageCollection 素材资源。无论此字段的值如何,Folder 资源的所有元素都将在 BASIC 视图中编码。
|
响应正文
如果成功,则响应正文包含一个 ListAssetsResponse
实例。
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/earthengine
https://www.googleapis.com/auth/earthengine.readonly
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-platform.read-only
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eLists container assets, such as folders or collections, within a specified parent resource.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering by date, properties, and geometry for \u003ccode\u003eImageCollection\u003c/code\u003e assets.\u003c/p\u003e\n"],["\u003cp\u003eSupports pagination to retrieve large result sets.\u003c/p\u003e\n"],["\u003cp\u003eRequires appropriate IAM permissions or OAuth scopes for authorization.\u003c/p\u003e\n"],["\u003cp\u003eOffers different views to control the level of detail returned for \u003ccode\u003eImageCollection\u003c/code\u003e assets.\u003c/p\u003e\n"]]],["This content describes how to list container assets like folders or collections via a `GET` request to `https://earthengine.googleapis.com/v1/{parent=projects/*}:listAssets`. The `parent` parameter specifies the container, with projects like \"earthengine-legacy\" or \"earthengine-public.\" Query parameters like `pageSize`, `pageToken`, `filter` (for `ImageCollection` assets), and `view` allow refining results. Authorization requires specific IAM permissions and OAuth scopes. The response is an instance of `ListAssetsResponse`, and the request body must be empty.\n"],null,["# Method: projects.listAssets\n\nLists any container asset, such as a folder or collection.\n\n### HTTP request\n\n`GET https://earthengine.googleapis.com/v1/{parent=projects/*}:listAssets`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The name of the container asset to list. `parent` is of the format \"projects/\\*\" or \"projects/\\*/assets/\\*\\*\" (e.g., \"projects/\\[PROJECT\\]\" or \"projects/earthengine-legacy/assets/users/\\[USER\\]/\\[ASSET\\]\"). All user-owned assets are currently under the project \"earthengine-legacy\" (e.g., \"projects/earthengine-legacy/assets/users/foo/bar\"). All other assets are under the project \"earthengine-public\" (e.g., \"projects/earthengine-public/assets/LANDSAT\"). If \"projects/earthengine-legacy\" is specified, the response will consist of a list of all top-level folders owned by the requesting user. Authorization requires one or more of the following [IAM](https://cloud.google.com/iam/docs/) permissions on the specified resource `parent`: - `earthengine.assets.get` - `earthengine.assets.list` |\n\n### Query parameters\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The maximum number of results per page. The server may return fewer assets than requested. If unspecified, the page size default depends on the EarthEngineAssetView, with higher limits for more restrictive views. |\n| `pageToken` | `string` A token identifying a page of results the server should return. Typically this is the value of [ListAssetsResponse.next_page_token](/earth-engine/reference/rest/v1/ListAssetsResponse#FIELDS.next_page_token) returned from the previous call to the `projects.listAssets` method. |\n| `filter` | `string` If present, specifies a filter. Filters are only applied to `ImageCollection` assets and are ignored for `Folder` assets. The fields `startTime`, `endTime`, and members of `properties` are recognized. The custom function `intersects(str)` is available, which allows filtering by geometry. An example date filter: \"startTime\u003e\\\"2020-01-01T00:00:00+00:00\\\" AND endTime\u003c\\\"2020-02-01T00:00:00+00:00\\\"\" An example property filter: \"properties.CLOUDY_PIXEL_PERCENTAGE\u003c30\" An example geometry filter: \"intersects(\\\"{'type':'Point','coordinates':[1,2]}\\\")\" \"intersects(\\\"{\\\\\\\"type\\\\\\\":\\\\\\\"Point\\\\\\\",\\\\\\\"coordinates\\\\\\\":[1,2]}\\\")\" See \u003chttps://google.aip.dev/160\u003e for more details on the filter language. |\n| `view` | `enum (`[EarthEngineAssetView](/earth-engine/reference/rest/v1/EarthEngineAssetView)`)` Specifies which parts of the `EarthEngineAsset` resource should be returned in the response. Only applies to `ImageCollection` assets. All elements of `Folder` assets will be encoded in the `BASIC` view regardless of the value of this field. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [ListAssetsResponse](/earth-engine/reference/rest/v1/ListAssetsResponse).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/earthengine`\n- `\n https://www.googleapis.com/auth/earthengine.readonly`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/cloud-platform.read-only`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]