Method: properties.customMetrics.patch
Обновляет CustomMetric для свойства.
HTTP-запрос
PATCH https://analyticsadmin.googleapis.com/v1beta/{customMetric.name=properties/*/customMetrics/*}
URL-адрес использует синтаксис транскодирования gRPC .
Параметры пути
Параметры |
---|
custom Metric. name | string Только вывод. Имя ресурса для этого ресурса CustomMetric. Формат: свойства/{свойство}/customMetrics/{customMetric} |
Параметры запроса
Параметры |
---|
update Mask | string ( FieldMask format) Необходимый. Список полей, которые необходимо обновить. Пропущенные поля не будут обновлены. Чтобы заменить всю сущность, используйте один путь со строкой «*», чтобы соответствовать всем полям. Это разделенный запятыми список полных имен полей. Пример: "user.displayName,photo" . |
Тело запроса
Тело запроса содержит экземпляр CustomMetric
.
Тело ответа
В случае успеха тело ответа содержит экземпляр CustomMetric
.
Области авторизации
Требуется следующая область действия OAuth:
-
https://www.googleapis.com/auth/analytics.edit
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-01-14 UTC.
[null,null,["Последнее обновление: 2025-01-14 UTC."],[[["This method updates a CustomMetric on a Google Analytics 4 property using an HTTP PATCH request to a specific endpoint with the CustomMetric's name in the path."],["You can specify which fields to update with the `updateMask` query parameter, using FieldMask format."],["The request body should contain the updated CustomMetric data in JSON format, adhering to the CustomMetric schema."],["Upon success, the response body will contain the updated CustomMetric, also formatted according to the CustomMetric schema."],["To use this method, your application needs to be authorized with the `https://www.googleapis.com/auth/analytics.edit` OAuth scope."]]],["This document details updating a CustomMetric on a property using a PATCH request to the specified URL: `https://analyticsadmin.googleapis.com/v1beta/{customMetric.name=properties/*/customMetrics/*}`. The `customMetric.name` is a required path parameter. The `updateMask` query parameter specifies fields to be updated. The request and response bodies both contain an instance of CustomMetric. This action requires the `https://www.googleapis.com/auth/analytics.edit` OAuth scope for authorization.\n"]]