Hãy thử máy chủ MCP cho Google Analytics. Cài đặt từ
GitHub và xem
thông báo để biết thêm thông tin chi tiết.
Method: properties.reportingDataAnnotations.list
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Liệt kê tất cả Chú thích dữ liệu báo cáo trên một tài sản.
Yêu cầu HTTP
GET https://analyticsadmin.googleapis.com/v1alpha/{parent=properties/*}/reportingDataAnnotations
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
parent |
string
Bắt buộc. Tên tài nguyên của thuộc tính. Định dạng: properties/property_id Ví dụ: properties/123
|
Tham số truy vấn
Thông số |
filter |
string
Không bắt buộc. Bộ lọc hạn chế những chú thích dữ liệu báo cáo nào trong tài sản mẹ được liệt kê. Các trường được hỗ trợ là:
- 'name'
title
description
annotationDate
annotationDateRange
color
Ngoài ra, API này còn cung cấp các hàm trợ giúp sau:
- annotation_duration() : thời lượng mà chú thích này đánh dấu, durations. dự kiến một giá trị biểu thị bằng số của giây, theo sau là hậu tố
s .
- is_annotation_in_range(startDate, endDate) : nếu chú thích nằm trong phạm vi do
startDate và endDate chỉ định. Ngày ở định dạng ISO-8601, ví dụ: 2031-06-28 .
Các toán tử được hỗ trợ:
= : bằng
!= : không bằng
< : nhỏ hơn
> : lớn hơn
<= : nhỏ hơn hoặc bằng
>= : lớn hơn hoặc bằng
: : có toán tử
=~ : khớp biểu thức chính quy
!~ : biểu thức chính quy không khớp
NOT : Không logic
AND : Dấu logic và
OR : Logic hoặc
Ví dụ:
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
Không bắt buộc. Số lượng tài nguyên tối đa cần trả về. Dịch vụ có thể trả về ít hơn giá trị này, ngay cả khi có các trang khác. Nếu không chỉ định, hệ thống sẽ trả về tối đa 50 tài nguyên. Giá trị tối đa là 200; (các giá trị cao hơn sẽ được ép thành giá trị tối đa)
|
pageToken |
string
Không bắt buộc. Mã thông báo trang, nhận được từ lệnh gọi reportingDataAnnotations.list trước đó. Cung cấp giá trị này để truy xuất trang tiếp theo. Khi phân trang, tất cả các tham số khác được cung cấp cho reportingDataAnnotations.list phải khớp với lệnh gọi đã cung cấp mã thông báo trang.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Thông báo phản hồi cho RPC ListReportingDataAnnotation.
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"reportingDataAnnotations": [
{
object (ReportingDataAnnotation )
}
],
"nextPageToken": string
} |
Trường |
reportingDataAnnotations[] |
object (ReportingDataAnnotation )
Danh sách chú thích dữ liệu báo cáo.
|
nextPageToken |
string
Mã thông báo có thể được gửi dưới dạng pageToken để truy xuất trang tiếp theo. Nếu bạn bỏ qua trường này, thì sẽ không có trang tiếp theo.
|
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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`"]]