ลองใช้เซิร์ฟเวอร์ MCP สำหรับ Google Analytics ติดตั้งจาก
GitHub และดูรายละเอียดเพิ่มเติมได้ที่
ประกาศ
Method: accountSummaries.list
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงข้อมูลสรุปของบัญชีทั้งหมดที่ผู้เรียกเข้าถึงได้
คำขอ HTTP
GET https://analyticsadmin.googleapis.com/v1alpha/accountSummaries
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์การค้นหา
พารามิเตอร์ |
pageSize |
integer
จำนวนทรัพยากร AccountSummary สูงสุดที่จะแสดง บริการอาจแสดงผลน้อยกว่าค่านี้ แม้ว่าจะมีหน้าเว็บเพิ่มเติมก็ตาม หากไม่ระบุ ระบบจะแสดงผลทรัพยากรสูงสุด 50 รายการ ค่าสูงสุดคือ 200 (ระบบจะบังคับค่าที่สูงกว่าให้เท่ากับค่าสูงสุด)
|
pageToken |
string
โทเค็นหน้าเว็บที่ได้รับจากการเรียกใช้ accountSummaries.list ก่อนหน้านี้ ระบุข้อมูลนี้เพื่อเรียกข้อมูลหน้าถัดไป เมื่อแบ่งหน้าเว็บ พารามิเตอร์อื่นๆ ทั้งหมดที่ระบุให้กับ accountSummaries.list ต้องตรงกับการเรียกที่ให้โทเค็นหน้าเว็บ
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
ข้อความตอบกลับสําหรับ RPC ของ accountSummaries.list
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง 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
ชื่อทรัพยากรของพร็อพเพอร์ตี้หลักเชิงตรรกะของพร็อพเพอร์ตี้นี้ หมายเหตุ: คุณใช้ UI การย้ายพร็อพเพอร์ตี้เพื่อเปลี่ยนพร็อพเพอร์ตี้หลักได้ รูปแบบ: accounts/{account}, properties/{property} ตัวอย่างเช่น "accounts/100", "properties/200"
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eLists and summarizes all Google Analytics 4 (GA4) accounts and their properties accessible to the authenticated user.\u003c/p\u003e\n"],["\u003cp\u003eAllows for pagination to handle large numbers of accounts using \u003ccode\u003epageSize\u003c/code\u003e and \u003ccode\u003epageToken\u003c/code\u003e parameters.\u003c/p\u003e\n"],["\u003cp\u003eEach account summary includes the account name, display name, and a list of associated property summaries.\u003c/p\u003e\n"],["\u003cp\u003eProvides property details such as property name, display name, type, and its parent resource.\u003c/p\u003e\n"],["\u003cp\u003eRequires specific authorization scopes for access, including 'analytics.readonly' or 'analytics.edit'.\u003c/p\u003e\n"]]],["This document details how to retrieve summaries of accessible Google Analytics accounts via an HTTP GET request to `https://analyticsadmin.googleapis.com/v1alpha/accountSummaries`. Key actions include setting optional `pageSize` and `pageToken` query parameters for pagination. The request body is empty. The response provides a list of `accountSummaries`, each containing account details and `propertySummaries`, with the possibility of a `nextPageToken` for subsequent pages. Authorization requires specific 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/v1alpha/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/v1alpha/accountSummaries/list#AccountSummary) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `accountSummaries[]` | `object (`[AccountSummary](/analytics/devguides/config/admin/v1/rest/v1alpha/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/v1alpha/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/v1alpha/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/v1alpha/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/v1alpha/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\" |"]]