Method: properties.customMetrics.patch
Обновляет CustomMetric для свойства.
HTTP-запрос
PATCH https://analyticsadmin.googleapis.com/v1alpha/{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 documentation outlines how to update a CustomMetric on a Google Analytics 4 property using an HTTP PATCH request."],["The request requires specifying the CustomMetric resource name in the path and uses a FieldMask in the query parameter to indicate fields to be updated."],["The request body should contain the updated CustomMetric data, and a successful response will return the updated CustomMetric object."],["Users need the `https://www.googleapis.com/auth/analytics.edit` authorization scope to perform this operation."]]],["This document outlines the process for updating a CustomMetric on a property using a PATCH request to `https://analyticsadmin.googleapis.com/v1alpha/{customMetric.name=properties/*/customMetrics/*}`. It details that the `customMetric.name` is a path parameter specifying the resource. The `updateMask` query parameter dictates which fields to modify. The request and response bodies use the `CustomMetric` instance. Editing requires the `https://www.googleapis.com/auth/analytics.edit` authorization scope.\n"]]