Method: projects.listAssets
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงรายการเนื้อหาคอนเทนเนอร์ เช่น โฟลเดอร์หรือคอลเล็กชัน
คำขอ HTTP
GET https://earthengine.googleapis.com/v1alpha/{parent=projects/*}:listAssets
URL ใช้ไวยากรณ์การแปลง 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" การตอบกลับจะประกอบด้วยรายการโฟลเดอร์ระดับบนสุดทั้งหมดที่ผู้ใช้ที่ส่งคำขอเป็นเจ้าของ
การให้สิทธิ์ต้องใช้สิทธิ์ IAM ต่อไปนี้อย่างน้อย 1 สิทธิ์ในทรัพยากร parent ที่ระบุ
earthengine.assets.get
earthengine.assets.list
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
pageSize |
integer
จำนวนผลลัพธ์สูงสุดต่อหน้า เซิร์ฟเวอร์อาจแสดงผลชิ้นงานน้อยกว่าที่ขอ หากไม่ได้ระบุ ค่าเริ่มต้นของขนาดหน้าเว็บจะขึ้นอยู่กับ EarthEngineAssetView โดยจะมีขีดจำกัดที่สูงขึ้นสำหรับมุมมองที่จำกัดมากขึ้น
|
pageToken |
string
โทเค็นที่ระบุหน้าผลการค้นหาที่เซิร์ฟเวอร์ควรแสดง โดยปกติแล้วค่านี้คือค่าของ ListAssetsResponse.next_page_token ที่แสดงผลจากการเรียกเมธอด projects.listAssets ก่อนหน้านี้
|
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 Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 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)."]]