- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- OutputConfig
- GcsDestination
- BigQueryDestination
- Try it!
Exports analytics metrics.
Operation.response is of type ExportAnalyticsMetricsResponse. Operation.metadata is of type ExportMetadata.
HTTP request
POST https://retail.googleapis.com/v2/{catalog=projects/*/locations/*/catalogs/*}:exportAnalyticsMetrics
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
catalog |
Required. Full resource name of the parent catalog. Expected format: |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"outputConfig": {
object ( |
| Fields | |
|---|---|
outputConfig |
Required. The output location of the data. |
filter |
A filtering expression to specify restrictions on returned metrics. The expression is a sequence of terms. Each term applies a restriction to the returned metrics. Use this expression to restrict results to a specific time range. Currently we expect only one types of fields:
Some examples of valid filters expressions:
|
Response body
If successful, the response body contains an instance of Operation.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the catalog resource:
retail.catalogs.exportAnalyticsMetrics
For more information, see the IAM documentation.
OutputConfig
The output configuration setting.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field destination. The configuration of destination for holding output data. destination can be only one of the following: |
|
gcsDestination |
The Google Cloud Storage location where the output is to be written to. |
bigqueryDestination |
The BigQuery location where the output is to be written to. |
GcsDestination
The Google Cloud Storage output destination configuration.
| JSON representation |
|---|
{ "outputUriPrefix": string } |
| Fields | |
|---|---|
outputUriPrefix |
Required. The output uri prefix for saving output data to json files. Some mapping examples are as follows: outputUriPrefix sample output(assuming the object is foo.json) ======================== ============================================= gs://bucket/ gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json gs://bucket/folder/item_ gs://bucket/folder/item_foo.json |
BigQueryDestination
The BigQuery output destination configuration.
| JSON representation |
|---|
{ "datasetId": string, "tableIdPrefix": string, "tableType": string } |
| Fields | |
|---|---|
datasetId |
Required. The ID of a BigQuery Dataset. |
tableIdPrefix |
Required. The prefix of exported BigQuery tables. |
tableType |
Required. Describes the table type. The following values are supported:
|