ชิ้นงาน: การค้นหา
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ค้นหาชิ้นงาน Looker Studio ของผู้ใช้
ส่งคำขอ
คำขอ HTTP
GET https://datastudio.googleapis.com/v1/assets:search
พารามิเตอร์
ชื่อพารามิเตอร์ |
ประเภท |
คำอธิบาย |
assetTypes |
Array<AssetType> |
ต้องระบุ ประเภทเนื้อหาที่จะค้นหา ต้องระบุประเภทชิ้นงาน 1 ประเภทเท่านั้น |
title |
สตริง |
สตริงการค้นหา โดยค่าเริ่มต้น ระบบจะตรวจสอบสตริงกับชื่อและคำอธิบายของเนื้อหา ดูสตริงการค้นหาขั้นสูงได้ที่ส่วนตัวอย่าง |
includeTrashed |
บูลีน |
ค่าเริ่มต้นคือ false
- เมื่อตั้งค่าพารามิเตอร์นี้เป็น
true ระบบจะรวมเฉพาะชิ้นงานจากถังขยะ - เมื่อตั้งค่าพารามิเตอร์นี้เป็น
false ระบบจะรวมเฉพาะชิ้นงานที่ไม่ได้อยู่ในถังขยะ
|
เจ้าของ |
สตริง |
อีเมลของเจ้าของเนื้อหา |
orderBy |
สตริง |
ลำดับของผลลัพธ์ คุณจัดเรียงตามช่องต่อไปนี้ได้
title
last_viewed_by_me
create_time
last_accessed_time
id
|
pageSize |
ตัวเลข |
จำนวนผลลัพธ์ที่จะรวมต่อหน้า ค่าเริ่มต้นคือ 1,000 |
pageToken |
สตริง |
โทเค็นที่ระบุหน้าผลการค้นหาที่จะแสดง หากต้องการแบ่งหน้าผลลัพธ์ ให้ใช้ค่า nextPageToken หรือค่า previousPageToken จากคำขออื่น |
การให้สิทธิ์
คำขอนี้ต้องมีการให้สิทธิ์ที่มีขอบเขตต่อไปนี้อย่างน้อย 1 รายการ
ขอบเขต |
https://www.googleapis.com/auth/datastudio.readonly |
https://www.googleapis.com/auth/datastudio |
เนื้อความของคำขอ
อย่าระบุเนื้อหาคำขอด้วยเมธอดนี้
การตอบกลับ
หากทำสำเร็จ เมธอดนี้จะแสดงเนื้อหาการตอบกลับที่มีโครงสร้างดังนี้
{
"assets": [Asset],
"nextPageToken": string
}
ชื่อพร็อพเพอร์ตี้ |
ประเภท |
คำอธิบาย |
เนื้อหา |
Array<Asset> |
รายการเนื้อหา |
nextPageToken |
สตริง |
โทเค็นเพื่อดึงข้อมูลผลลัพธ์หน้าถัดไป พร็อพเพอร์ตี้นี้จะแสดงก็ต่อเมื่อจำนวนผลลัพธ์มากกว่าคำขอ pageSize nextPageToken ที่ว่างเปล่าแสดงว่าไม่มีผลลัพธ์ที่จะแสดงอีกต่อไป |
previousPageToken |
สตริง |
โทเค็นเพื่อดึงข้อมูลผลลัพธ์หน้าก่อนหน้า previousPageToken ที่ว่างเปล่าแสดงถึงจุดเริ่มต้นของชุดผลลัพธ์ |
ตัวอย่าง
คุณส่งสตริงการค้นหาขั้นสูงได้ในช่อง title
คุณใช้การค้นหาหลายประเภทในสตริงการค้นหาเดียวได้
ดูไวยากรณ์สตริงการค้นหาที่รองรับได้ในตารางต่อไปนี้ คุณรวมสตริงการค้นหาหลายรายการได้
ตัวกรอง |
คำจำกัดความ |
ตัวอย่าง |
ผู้สร้าง |
ค้นหาชิ้นงานที่สร้างโดยผู้ใช้ที่ระบุ |
creator:me creator:user@example.com
|
เจ้าของ |
ค้นหาเนื้อหาที่เป็นของผู้ใช้ที่เฉพาะเจาะจง |
owner:me owner:user@example.com
|
โปรเจ็กต์ |
ค้นหาชิ้นงานในโปรเจ็กต์ |
|
Workspace |
ค้นหาชิ้นงานในพื้นที่ทำงานหรือโฟลเดอร์ |
parentWorkspace:2a080c66-50cb-4399-92a8-74c534da2de9
|
จาก |
ค้นหาชิ้นงานที่ผู้ใช้แชร์กับคุณ |
|
ถึง |
ค้นหาชิ้นงานที่คุณแชร์กับผู้ใช้หรือกลุ่ม |
to:user@example.com to:example-group@googlegroups.com
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eSearch for specific Looker Studio assets using parameters like asset type, title, owner, and more.\u003c/p\u003e\n"],["\u003cp\u003eFilter search results to include or exclude trashed assets.\u003c/p\u003e\n"],["\u003cp\u003eOrder results by title and control the number of results per page using pagination.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific scopes for data access.\u003c/p\u003e\n"],["\u003cp\u003eThe API response includes a list of matching assets and a token for retrieving subsequent pages.\u003c/p\u003e\n"]]],[],null,["# Assets: search\n\nSearch a user's Looker Studio assets.\n\nRequest\n-------\n\n### HTTP request\n\n GET https://datastudio.googleapis.com/v1/assets:search\n\n### Parameters\n\n| Parameter name | Type | Description |\n|----------------|------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| assetTypes | Array\\\u003c[AssetType](/looker-studio/integrate/api/reference/types#AssetType)\\\u003e | **Required**. The asset type to search. Exactly one asset type must be specified. |\n| title | string | The search string. By default, the string is checked against the title and description of the asset. See the [Examples](#examples) section for advanced search strings. |\n| includeTrashed | boolean | Defaults to `false`. - When this parameter is set to `true`, only assets from the trash are included. - When this parameter is set to `false`, only assets not in the trash are included. |\n| owner | string | The asset owner's email. |\n| orderBy | string | The order of the results. You can sort by the following fields: - `title` - `last_viewed_by_me` - `create_time` - `last_accessed_time` - `id` |\n| pageSize | number | The number of results to include per page. Defaults to 1000. |\n| pageToken | string | A token identifying a page of results to return. To paginate results, use a `nextPageToken` value or `previousPageToken` value from another request. |\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes:\n\n| Scope |\n|-------------------------------------------------------|\n| `https://www.googleapis.com/auth/datastudio.readonly` |\n| `https://www.googleapis.com/auth/datastudio` |\n\n### Request body\n\nDon't supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure: \n\n {\n \"assets\": [Asset],\n \"nextPageToken\": string\n }\n\n| Property name | Type | Description |\n|-------------------|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| assets | Array\\\u003c[Asset](/looker-studio/integrate/api/reference/types#Asset)\\\u003e | The list of assets. |\n| nextPageToken | string | A token to retrieve the next page of results. This property is only present when the number of results is greater than the request `pageSize`. An empty `nextPageToken` indicates that there are no more results to return. |\n| previousPageToken | string | A token to retrieve the previous page of results. An empty `previousPageToken` indicates the beginning of the result set. |\n\nExamples\n--------\n\nYou can pass advanced search strings in the `title` field.\nYou can use multiple search types in a single search string.\nSee the following table for supported search string syntax. You can combine\nmultiple search strings.\n\n| Filter | Definition | Examples |\n|-----------|--------------------------------------------------------------|---------------------------------------------------------------|\n| Creator | Search for assets created by a specific user. | - `creator:me` - `creator:user@example.com` |\n| Owner | Search for assets owned by a specific user. | - `owner:me` - `owner:user@example.com` |\n| Project | Search for assets in a project. | - `projectNumber:123456789` |\n| Workspace | Search for assets in a workspace or folder. | - `parentWorkspace:2a080c66-50cb-4399-92a8-74c534da2de9` |\n| From | Search for assets that a user has shared with you. | - `from:user@example.com` |\n| To | Search for assets that you have shared with a user or group. | - `to:user@example.com` - `to:example-group@googlegroups.com` |"]]