资源:搜索
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
搜索用户的 Looker Studio 资源。
请求
HTTP 请求
GET https://datastudio.googleapis.com/v1/assets:search
参数
参数名称 |
类型 |
说明 |
assetTypes |
数组<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
}
属性名称 |
类型 |
说明 |
素材资源 |
数组<资源> |
资源列表。 |
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
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):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` |"]]