Method: projects.listAssets
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Liệt kê mọi thành phần vùng chứa, chẳng hạn như thư mục hoặc bộ sưu tập.
Yêu cầu HTTP
GET https://earthengine.googleapis.com/v1alpha/{parent=projects/*}:listAssets
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
parent |
string
Bắt buộc. Tên của thành phần vùng chứa cần liệt kê. parent có định dạng "projects/*" hoặc "projects/*/assets/**" (ví dụ: "projects/[PROJECT]" hoặc "projects/earthengine-legacy/assets/users/[USER]/[ASSET]"). Tất cả tài sản thuộc sở hữu của người dùng hiện đang thuộc dự án "earthengine-legacy" (ví dụ: "projects/earthengine-legacy/assets/users/foo/bar"). Tất cả các tài sản khác đều thuộc dự án "earthengine-public" (ví dụ: "projects/earthengine-public/assets/LANDSAT"). Nếu bạn chỉ định "projects/earthengine-legacy", thì phản hồi sẽ bao gồm danh sách tất cả thư mục cấp cao nhất do người dùng yêu cầu sở hữu.
Việc uỷ quyền yêu cầu một hoặc nhiều quyền IAM sau đây trên tài nguyên parent được chỉ định:
earthengine.assets.get
earthengine.assets.list
|
Tham số truy vấn
Thông số |
pageSize |
integer
Số lượng kết quả tối đa trên mỗi trang. Máy chủ có thể trả về ít thành phần hơn so với yêu cầu. Nếu không chỉ định, kích thước trang mặc định sẽ phụ thuộc vào EarthEngineAssetView, với các giới hạn cao hơn cho các chế độ xem hạn chế hơn.
|
pageToken |
string
Mã thông báo xác định trang kết quả mà máy chủ sẽ trả về. Thông thường, đây là giá trị của ListAssetsResponse.next_page_token được trả về từ lệnh gọi trước đó đến phương thức projects.listAssets .
|
filter |
string
Chỉ định một bộ lọc (nếu có). Bộ lọc chỉ áp dụng cho các thành phần ImageCollection và bị bỏ qua đối với các thành phần Folder . Các trường startTime , endTime và các thành phần của properties được nhận dạng. Hàm tuỳ chỉnh intersects(str) có sẵn, cho phép lọc theo hình học. Ví dụ về bộ lọc ngày:
"startTime>\"2020-01-01T00:00:00+00:00\" AND
endTime<\"2020-02-01T00:00:00+00:00\""
Ví dụ về bộ lọc thuộc tính:
"properties.CLOUDY_PIXEL_PERCENTAGE<30"
Ví dụ về bộ lọc hình học:
"intersects(\"{'type':'Point','coordinates':[1,2]}\")"
"intersects(\"{\\\"type\\\":\\\"Point\\\",\\\"coordinates\\\":[1,2]}\")"
Hãy xem https://google.aip.dev/160 để biết thêm chi tiết về ngôn ngữ bộ lọc.
|
view |
enum (EarthEngineAssetView )
Chỉ định những phần của tài nguyên EarthEngineAsset sẽ được trả về trong phản hồi. Chỉ áp dụng cho các thành phần ImageCollection . Tất cả phần tử của thành phần Folder sẽ được mã hoá trong thành phần hiển thị BASIC bất kể giá trị của trường này.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của ListAssetsResponse
.
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
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
Để biết thêm thông tin, hãy xem OAuth 2.0 Overview.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\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\u003eResponse includes details about the listed assets and a token for retrieving subsequent pages.\u003c/p\u003e\n"]]],["This describes the `listAssets` method, which retrieves a list of container assets like folders or collections. The method uses a `GET` request with the `parent` path parameter, specifying the container to list (e.g., projects or user folders). Optional query parameters include `pageSize` and `pageToken` for pagination, `filter` to filter `ImageCollection` assets by date, properties or geometry and `view` to specify the `EarthEngineAsset` returned parts. Authorization needs specific IAM permissions. The request body is 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/v1alpha/{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/v1alpha/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/v1alpha/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/v1alpha/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)."]]