資產: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
專案 在專案中搜尋資產。
  • projectNumber:123456789
工作區 在工作區或資料夾中搜尋素材資源。
  • parentWorkspace:2a080c66-50cb-4399-92a8-74c534da2de9
寄件者 搜尋使用者與您共用的資產。
  • from:user@example.com
收件者 搜尋您與使用者或群組共用的資產。
  • to:user@example.com
  • to:example-group@googlegroups.com