ลองใช้เซิร์ฟเวอร์ MCP สำหรับ Google Analytics ติดตั้งจาก
GitHub และดูรายละเอียดเพิ่มเติมได้ที่
ประกาศ
Method: properties.reportingDataAnnotations.list
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงรายการคําอธิบายประกอบข้อมูลการรายงานทั้งหมดในพร็อพเพอร์ตี้
คำขอ HTTP
GET https://analyticsadmin.googleapis.com/v1alpha/{parent=properties/*}/reportingDataAnnotations
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
parent |
string
ต้องระบุ ชื่อแหล่งข้อมูลของพร็อพเพอร์ตี้ รูปแบบ: properties/property_id ตัวอย่างเช่น properties/123
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
filter |
string
ไม่บังคับ ตัวกรองที่จำกัดคําอธิบายประกอบข้อมูลการรายงานภายใต้พร็อพเพอร์ตี้หลักที่จะแสดง ฟิลด์ที่รองรับ ได้แก่
- 'name'
title
description
annotationDate
annotationDateRange
color
นอกจากนี้ API นี้ยังมีฟังก์ชันตัวช่วยต่อไปนี้
- annotation_duration() : ระยะเวลาที่คําอธิบายประกอบนี้ทําเครื่องหมาย durations คาดว่าจะมีการแสดงวินาทีเป็นตัวเลขตามด้วยส่วนต่อท้าย
s
- is_annotation_in_range(startDate, endDate) : หากคำอธิบายประกอบอยู่ในช่วงที่กำหนดโดย
startDate และ endDate วันที่อยู่ในรูปแบบ ISO-8601 เช่น 2031-06-28
การดำเนินการที่รองรับ
= : เท่ากับ
!= : ไม่เท่ากับ
< : น้อยกว่า
> : มากกว่า
<= : น้อยกว่าหรือเท่ากับ
>= : มากกว่าหรือเท่ากับ
: : โอเปอเรเตอร์ has
=~ : การทํางานของนิพจน์ทั่วไป
!~ : นิพจน์ทั่วไปไม่ตรงกัน
NOT : ตรรกะเชิงลบ
AND : มีเหตุผลและ
OR : ตัวดำเนินการหรือ
ตัวอย่าง
title="Holiday Sale"
description=~"[Bb]ig [Gg]ame.*[Ss]ale"
is_annotation_in_range("2025-12-25", "2026-01-16") = true
annotation_duration() >= 172800s AND title:BOGO
|
pageSize |
integer
ไม่บังคับ จำนวนทรัพยากรสูงสุดที่จะแสดง บริการอาจแสดงผลน้อยกว่าค่านี้ แม้ว่าจะมีหน้าเว็บเพิ่มเติมก็ตาม หากไม่ระบุ ระบบจะแสดงผลทรัพยากรสูงสุด 50 รายการ ค่าสูงสุดคือ 200 (ระบบจะบังคับค่าที่สูงกว่าให้เท่ากับค่าสูงสุด)
|
pageToken |
string
ไม่บังคับ โทเค็นหน้าเว็บที่ได้รับจากการเรียกใช้ reportingDataAnnotations.list ก่อนหน้านี้ ระบุข้อมูลนี้เพื่อเรียกข้อมูลหน้าถัดไป เมื่อแบ่งหน้าเว็บ พารามิเตอร์อื่นๆ ทั้งหมดที่ระบุให้กับ reportingDataAnnotations.list ต้องตรงกับการเรียกที่ให้โทเค็นหน้าเว็บ
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
ข้อความตอบกลับสําหรับ RPC ของ ListReportingDataAnnotation
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ช่อง |
reportingDataAnnotations[] |
object (ReportingDataAnnotation )
รายการคำอธิบายประกอบข้อมูลการรายงาน
|
nextPageToken |
string
โทเค็น ซึ่งสามารถส่งเป็น pageToken เพื่อเรียกข้อมูลหน้าถัดไป หากละเว้นช่องนี้ จะไม่มีหน้าถัดไป
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# Method: properties.reportingDataAnnotations.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListReportingDataAnnotationsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nList all Reporting Data Annotations on a property.\n\n### HTTP request\n\n`GET https://analyticsadmin.googleapis.com/v1alpha/{parent=properties/*}/reportingDataAnnotations`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. Resource name of the property. Format: properties/property_id Example: properties/123 |\n\n### Query parameters\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `filter` | `string` Optional. Filter that restricts which reporting data annotations under the parent property are listed. Supported fields are: - 'name' - `title` - `description` - `annotationDate` - `annotationDateRange` - `color` Additionally, this API provides the following helper functions: - annotation_duration() : the duration that this annotation marks, [durations](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/duration.proto). expect a numeric representation of seconds followed by an `s` suffix. - is_annotation_in_range(startDate, endDate) : if the annotation is in the range specified by the `startDate` and `endDate`. The dates are in ISO-8601 format, for example `2031-06-28`. Supported operations: - `=` : equals - `!=` : not equals - `\u003c` : less than - `\u003e` : greater than - `\u003c=` : less than or equals - `\u003e=` : greater than or equals - `:` : has operator - `=~` : [regular expression](https://github.com/google/re2/wiki/Syntax) match - `!~` : [regular expression](https://github.com/google/re2/wiki/Syntax) does not match - `NOT` : Logical not - `AND` : Logical and - `OR` : Logical or Examples: 1. `title=\"Holiday Sale\"` 2. `description=~\"[Bb]ig [Gg]ame.*[Ss]ale\"` 3. `is_annotation_in_range(\"2025-12-25\", \"2026-01-16\") = true` 4. `annotation_duration() \u003e= 172800s AND title:BOGO` |\n| `pageSize` | `integer` Optional. The maximum number of 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` Optional. A page token, received from a previous `reportingDataAnnotations.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `reportingDataAnnotations.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 ListReportingDataAnnotation RPC.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"reportingDataAnnotations\": [ { object (/analytics/devguides/config/admin/v1/rest/v1alpha/properties.reportingDataAnnotations#ReportingDataAnnotation) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `reportingDataAnnotations[]` | `object (`[ReportingDataAnnotation](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.reportingDataAnnotations#ReportingDataAnnotation)`)` List of Reporting Data Annotations. |\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`"]]