试用 Google Analytics 的 MCP 服务器。从
GitHub 安装,并参阅
公告了解详情。
Method: properties.reportTasks.create
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
启动报告任务的创建。此方法可快速返回报告任务,并启动长时间运行的异步请求,以生成 Google Analytics(分析)事件数据的自定义报告。
创建报告任务后的 72 小时内,系统会保留该任务并可供查询。
有权访问相应媒体资源的所有用户均可列出和查询由一位用户创建的报告任务。
HTTP 请求
POST https://analyticsdata.googleapis.com/v1alpha/{parent=properties/*}/reportTasks
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
必需。将在其中创建此报告任务的父级资源。格式:properties/{propertyId}
|
请求正文
请求正文包含一个 ReportTask
实例。
响应正文
如果成功,响应正文将包含一个新创建的 Operation
实例。
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eInitiates a long-running asynchronous request to create a customized report of Google Analytics event data.\u003c/p\u003e\n"],["\u003cp\u003eCreated report tasks are retained and available for querying for 72 hours.\u003c/p\u003e\n"],["\u003cp\u003eReport tasks are accessible to all users with property access.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with either \u003ccode\u003ehttps://www.googleapis.com/auth/analytics.readonly\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/analytics\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This describes the process to create a report task for Google Analytics event data. A `POST` request is sent to `https://analyticsdata.googleapis.com/v1alpha/{parent=properties/*}/reportTasks`, where `parent` specifies the property. The request body must include a `ReportTask` instance. Upon success, it will respond with an `Operation` instance. Authorization requires either the `analytics.readonly` or `analytics` scope. Created tasks are retained for 72 hours and accessible to all property users.\n"],null,["# Method: properties.reportTasks.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nInitiates the creation of a report task. This method quickly returns a report task and initiates a long running asynchronous request to form a customized report of your Google Analytics event data.\n\nA report task will be retained and available for querying for 72 hours after it has been created.\n\nA report task created by one user can be listed and queried by all users who have access to the property.\n\n### HTTP request\n\n`POST https://analyticsdata.googleapis.com/v1alpha/{parent=properties/*}/reportTasks`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent resource where this report task will be created. Format: `properties/{propertyId}` |\n\n### Request body\n\nThe request body contains an instance of [ReportTask](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.reportTasks#ReportTask).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Operation](/analytics/devguides/reporting/data/v1/rest/Shared.Types/Operation).\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`"]]