试用 Google Analytics 的 MCP 服务器。从
GitHub 安装,并参阅
公告了解详情。
Method: accountSummaries.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://analyticsadmin.googleapis.com/v1beta/accountSummaries
网址采用 gRPC 转码语法。
查询参数
参数 |
pageSize |
integer
要返回的 AccountSummary 资源的数量上限。服务返回的数量可能小于此值,即使有其他网页也是如此。如果未指定,则最多返回 50 个资源。最大值为 200;(更高的值将被强制转换为最大值)
|
pageToken |
string
从之前的 accountSummaries.list 调用接收的页面令牌。提供此令牌以检索后续页面。进行分页时,提供给 accountSummaries.list 的所有其他参数必须与提供页面令牌的调用匹配。
|
响应正文
accountSummaries.list RPC 的响应消息。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"accountSummaries": [
{
object (AccountSummary )
}
],
"nextPageToken": string
} |
字段 |
accountSummaries[] |
object (AccountSummary )
调用方有权访问的所有账号的账号摘要。
|
nextPageToken |
string
可作为 pageToken 发送并用于检索下一页的令牌。如果省略此字段,则不存在后续页面。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
AccountSummary
一个虚拟资源,用于概要显示某个账号及其所有子 Google Analytics 媒体资源。
JSON 表示法 |
{
"name": string,
"account": string,
"displayName": string,
"propertySummaries": [
{
object (PropertySummary )
}
]
} |
字段 |
name |
string
此账号摘要的资源名称。格式:accountSummaries/{account_id} 示例:“accountSummaries/1000”
|
account |
string
此账号摘要中提及的账号的资源名称。格式:accounts/{account_id}。示例:“accounts/1000”
|
displayName |
string
此账号摘要中提及的账号的显示名称。
|
propertySummaries[] |
object (PropertySummary )
此账号的子账号摘要列表。
|
PropertySummary
表示 Google Analytics 媒体资源元数据的虚拟资源。
JSON 表示法 |
{
"property": string,
"displayName": string,
"propertyType": enum (PropertyType ),
"parent": string
} |
字段 |
property |
string
此房源摘要中提及的房源的资源名称。格式:properties/{property_id}。示例:“properties/1000”
|
displayName |
string
此媒体资源摘要中提及的媒体资源的显示名称。
|
propertyType |
enum (PropertyType )
媒体资源的媒体资源类型。
|
parent |
string
此媒体资源的逻辑父项的资源名称。 注意:您可以使用“移动媒体资源”界面更改父级。格式:accounts/{account}、properties/{property}。示例:“accounts/100”“properties/200”
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThis endpoint returns summaries of all Google Analytics 4 accounts and their properties accessible by the caller.\u003c/p\u003e\n"],["\u003cp\u003eSummaries provide an overview of account details such as name, display name, and associated properties including their types and parent information.\u003c/p\u003e\n"],["\u003cp\u003eThe response can be paginated using \u003ccode\u003epageSize\u003c/code\u003e and \u003ccode\u003epageToken\u003c/code\u003e parameters for retrieving large sets of account data.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires either \u003ccode\u003eanalytics.readonly\u003c/code\u003e or \u003ccode\u003eanalytics.edit\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eUse the \u003ccode\u003eTry it!\u003c/code\u003e section to experiment with the API directly.\u003c/p\u003e\n"]]],["This document details how to retrieve summaries of Google Analytics accounts. It uses a `GET` HTTP request to `https://analyticsadmin.googleapis.com/v1beta/accountSummaries`. Optional query parameters include `pageSize` (up to 200) and `pageToken` for pagination. The request body is empty. The response contains `accountSummaries` (an array with each element being `AccountSummary`), and `nextPageToken`. Each `AccountSummary` contains account details and an array of `PropertySummary`, which includes a property's metadata. The request requires either `analytics.readonly` or `analytics.edit` OAuth scopes.\n"],null,["# Method: accountSummaries.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListAccountSummariesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [AccountSummary](#AccountSummary)\n - [JSON representation](#AccountSummary.SCHEMA_REPRESENTATION)\n- [PropertySummary](#PropertySummary)\n - [JSON representation](#PropertySummary.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nReturns summaries of all accounts accessible by the caller.\n\n### HTTP request\n\n`GET https://analyticsadmin.googleapis.com/v1beta/accountSummaries`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum) |\n| `pageToken` | `string` A page token, received from a previous `accountSummaries.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `accountSummaries.list` must match the call that provided the page token. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse message for accountSummaries.list RPC.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"accountSummaries\": [ { object (/analytics/devguides/config/admin/v1/rest/v1beta/accountSummaries/list#AccountSummary) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `accountSummaries[]` | `object (`[AccountSummary](/analytics/devguides/config/admin/v1/rest/v1beta/accountSummaries/list#AccountSummary)`)` Account summaries of all accounts the caller has access to. |\n| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/analytics.readonly`\n- `https://www.googleapis.com/auth/analytics.edit`\n\nAccountSummary\n--------------\n\nA virtual resource representing an overview of an account and all its child Google Analytics properties.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"account\": string, \"displayName\": string, \"propertySummaries\": [ { object (/analytics/devguides/config/admin/v1/rest/v1beta/accountSummaries/list#PropertySummary) } ] } ``` |\n\n| Fields ||\n|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Resource name for this account summary. Format: accountSummaries/{account_id} Example: \"accountSummaries/1000\" |\n| `account` | `string` Resource name of account referred to by this account summary Format: accounts/{account_id} Example: \"accounts/1000\" |\n| `displayName` | `string` Display name for the account referred to in this account summary. |\n| `propertySummaries[]` | `object (`[PropertySummary](/analytics/devguides/config/admin/v1/rest/v1beta/accountSummaries/list#PropertySummary)`)` List of summaries for child accounts of this account. |\n\nPropertySummary\n---------------\n\nA virtual resource representing metadata for a Google Analytics property.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"property\": string, \"displayName\": string, \"propertyType\": enum (/analytics/devguides/config/admin/v1/rest/v1beta/properties#PropertyType), \"parent\": string } ``` |\n\n| Fields ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `property` | `string` Resource name of property referred to by this property summary Format: properties/{property_id} Example: \"properties/1000\" |\n| `displayName` | `string` Display name for the property referred to in this property summary. |\n| `propertyType` | `enum (`[PropertyType](/analytics/devguides/config/admin/v1/rest/v1beta/properties#PropertyType)`)` The property's property type. |\n| `parent` | `string` Resource name of this property's logical parent. Note: The Property-Moving UI can be used to change the parent. Format: accounts/{account}, properties/{property} Example: \"accounts/100\", \"properties/200\" |"]]