试用 Google Analytics 的 MCP 服务器。从
GitHub 安装,并参阅
公告了解详情。
Method: properties.provisionSubproperty
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
创建一个子媒体资源以及适用于所创建子媒体资源的子媒体资源事件过滤器。
HTTP 请求
POST https://analyticsadmin.googleapis.com/v1alpha/properties:provisionSubproperty
网址采用 gRPC 转码语法。
请求正文
请求正文中包含结构如下的数据:
字段 |
subproperty |
object (Property )
必需。要创建的子媒体资源。
|
subpropertyEventFilter |
object (SubpropertyEventFilter )
可选。要在普通媒体资源上创建的子媒体资源事件过滤器。
|
customDimensionAndMetricSynchronizationMode |
enum (SynchronizationMode )
可选。自定义维度和指标的子媒体资源功能同步模式
|
响应正文
针对 properties.provisionSubproperty RPC 的响应消息。
如果成功,响应正文将包含结构如下的数据:
字段 |
subproperty |
object (Property )
创建的子媒体资源。
|
subpropertyEventFilter |
object (SubpropertyEventFilter )
创建的子媒体资源事件过滤器。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/analytics.edit
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eProvision a new subproperty and an optional subproperty event filter within a Google Analytics property using the \u003ccode\u003eproperties.provisionSubproperty\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a \u003ccode\u003esubproperty\u003c/code\u003e object and optionally includes a \u003ccode\u003esubpropertyEventFilter\u003c/code\u003e for defining event filtering criteria.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns the created \u003ccode\u003esubproperty\u003c/code\u003e and the \u003ccode\u003esubpropertyEventFilter\u003c/code\u003e if provided.\u003c/p\u003e\n"],["\u003cp\u003eThis operation requires the \u003ccode\u003ehttps://www.googleapis.com/auth/analytics.edit\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],["This content outlines how to provision a subproperty and its event filter using an HTTP POST request. The request, sent to `https://analyticsadmin.googleapis.com/v1alpha/properties:provisionSubproperty`, requires a JSON body containing the `subproperty` object and an optional `subpropertyEventFilter` object. Upon success, the response body will include the created `subproperty` and the `subpropertyEventFilter`, as objects. Authorization using the `analytics.edit` scope is required.\n"],null,["# Method: properties.provisionSubproperty\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ProvisionSubpropertyResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreate a subproperty and a subproperty event filter that applies to the created subproperty.\n\n### HTTP request\n\n`POST https://analyticsadmin.googleapis.com/v1alpha/properties:provisionSubproperty`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"subproperty\": { object (/analytics/devguides/config/admin/v1/rest/v1alpha/properties#Property) }, \"subpropertyEventFilter\": { object (/analytics/devguides/config/admin/v1/rest/v1alpha/properties.subpropertyEventFilters#SubpropertyEventFilter) }, \"customDimensionAndMetricSynchronizationMode\": enum (/analytics/devguides/config/admin/v1/rest/v1alpha/properties.subpropertySyncConfigs#SynchronizationMode) } ``` |\n\n| Fields ||\n|-----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `subproperty` | `object (`[Property](/analytics/devguides/config/admin/v1/rest/v1alpha/properties#Property)`)` Required. The subproperty to create. |\n| `subpropertyEventFilter` | `object (`[SubpropertyEventFilter](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.subpropertyEventFilters#SubpropertyEventFilter)`)` Optional. The subproperty event filter to create on an ordinary property. |\n| `customDimensionAndMetricSynchronizationMode` | `enum (`[SynchronizationMode](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.subpropertySyncConfigs#SynchronizationMode)`)` Optional. The subproperty feature synchronization mode for Custom Dimensions and Metrics |\n\n### Response body\n\nResponse message for properties.provisionSubproperty RPC.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"subproperty\": { object (/analytics/devguides/config/admin/v1/rest/v1alpha/properties#Property) }, \"subpropertyEventFilter\": { object (/analytics/devguides/config/admin/v1/rest/v1alpha/properties.subpropertyEventFilters#SubpropertyEventFilter) } } ``` |\n\n| Fields ||\n|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `subproperty` | `object (`[Property](/analytics/devguides/config/admin/v1/rest/v1alpha/properties#Property)`)` The created subproperty. |\n| `subpropertyEventFilter` | `object (`[SubpropertyEventFilter](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.subpropertyEventFilters#SubpropertyEventFilter)`)` The created subproperty event filter. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/analytics.edit`"]]