資產:search
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
搜尋使用者的 Looker Studio 資產。
要求
HTTP 要求
GET https://datastudio.googleapis.com/v1/assets:search
參數
參數名稱 |
類型 |
說明 |
assetTypes |
Array<AssetType> |
必填。要搜尋的資產類型。必須指定一個資產類型。 |
title |
字串 |
搜尋字串。根據預設,系統會根據資產的標題和說明檢查字串。如需進階搜尋字串,請參閱「範例」一節。 |
includeTrashed |
布林值 |
這個變數預設為 false 。
- 如果將這個參數設為
true ,系統只會納入垃圾桶中的資產。 - 如果將這個參數設為
false ,系統只會納入未刪除的資產。
|
擁有者 |
字串 |
資產擁有者的電子郵件地址。 |
orderBy |
字串 |
結果的順序。你可以依下列欄位排序:
title
last_viewed_by_me
create_time
last_accessed_time
id
|
pageSize |
數字 |
每頁要顯示的結果數。預設值為 1000。 |
pageToken |
字串 |
這個符記可識別要傳回的結果頁面。如要將結果分頁,請使用其他要求的 nextPageToken 值或 previousPageToken 值。 |
授權
這項要求需要至少下列其中一個範圍的授權:
範圍 |
https://www.googleapis.com/auth/datastudio.readonly |
https://www.googleapis.com/auth/datastudio |
要求主體
請勿透過此方法提供要求主體。
回應
如果成功的話,這個方法會傳回回應內文,其結構如下:
{
"assets": [Asset],
"nextPageToken": string
}
屬性名稱 |
類型 |
說明 |
資產 |
陣列<Asset> |
資產清單。 |
nextPageToken |
字串 |
用來擷取下一頁結果的符記。只有在結果數量大於請求 pageSize 時,才會顯示這項屬性。如果 nextPageToken 為空,表示沒有其他結果可傳回。 |
previousPageToken |
字串 |
用來擷取上一頁結果的符記。空白的 previousPageToken 表示結果集的開頭。 |
範例
您可以在 title
欄位中傳遞進階搜尋字串。
您可以在單一搜尋字串中使用多種搜尋類型。
下表列出支援的搜尋字串語法。你可以組合多個搜尋字串。
篩選器 |
定義 |
範例 |
建立者 |
搜尋特定使用者建立的素材資源。 |
creator:me creator:user@example.com
|
擁有者 |
搜尋特定使用者擁有的資產。 |
owner:me owner:user@example.com
|
專案 |
在專案中搜尋資產。 |
|
工作區 |
在工作區或資料夾中搜尋素材資源。 |
parentWorkspace:2a080c66-50cb-4399-92a8-74c534da2de9
|
寄件者 |
搜尋使用者與您共用的資產。 |
|
收件者 |
搜尋您與使用者或群組共用的資產。 |
to:user@example.com to:example-group@googlegroups.com
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\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` |"]]