Method: properties.calculatedMetrics.create
HTTP リクエスト
POST https://analyticsadmin.googleapis.com/v1alpha/{parent=properties/*}/calculatedMetrics
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
parent |
string
必須。形式: properties/{property_id} 例: properties/1234
|
クエリ パラメータ
パラメータ |
calculatedMetricId |
string
必須。計算指標に使用する ID。計算指標のリソース名の最終的なコンポーネントになります。 この値は 1 ~ 80 文字で、有効な文字は /[a-zA-Z0-9_]/ です。スペースは使用できません。calculatedMetricId は、プロパティ内のすべての計算指標で一意にする必要があります。calculatedMetricId は、外部 API からこの計算指標を参照する場合に使用されます(例: calcMetric:{calculatedMetricId})。
|
リクエストの本文
リクエストの本文には CalculatedMetric
のインスタンスが含まれます。
レスポンスの本文
成功した場合、レスポンスの本文には、新しく作成された CalculatedMetric
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/analytics.edit
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-01-14 UTC。
[null,null,["最終更新日 2025-01-14 UTC。"],[[["Creates a new CalculatedMetric within a specified Google Analytics 4 property using an HTTP POST request."],["Requires providing a unique `calculatedMetricId` and the `property_id` as path and query parameters, respectively."],["The request body should contain the CalculatedMetric definition, and a successful response will return the newly created CalculatedMetric instance."],["Users need to have the `analytics.edit` OAuth scope to authorize this operation."]]],["This documentation details how to create a CalculatedMetric via a `POST` request to the specified URL, including required components such as path and query parameters, the request body and the response body. The path parameter `parent` defines the property ID. The query parameter `calculatedMetricId` is a unique identifier. The request and response bodies are `CalculatedMetric` instances. This action requires authorization scope: `https://www.googleapis.com/auth/analytics.edit`.\n"]]