Web Analytics Buddy [Beta]

Web Analytics Buddy [Beta] · GPT 작업

Google Analytics Data API

Accesses report data in Google Analytics.

  • GET /v1beta/properties/{property}/metadatagetMetadata

    Returns dimensions and metrics available for reporting methods like 'runReport'. Used to explore the dimensions and metrics.

  • POST /v1beta/properties/{property}:runReportrunReport

    Returns a report of your Analytics property event data.Metrics are individual measurements of user activity,such as active users or event count.Dimensions break down metrics across some common criteria,such as country or event name.Metrics/Dimensions can be obtained from the 'getMetadata' request.

원본 API 스키마
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://webanalyticsbuddy.cannyweb.co.uk"
    }
  ],
  "info": {
    "contact": {
      "name": "Google",
      "url": "https://google.com"
    },
    "description": "Accesses report data in Google Analytics.",
    "license": {
      "name": "Creative Commons Attribution 3.0",
      "url": "http://creativecommons.org/licenses/by/3.0/"
    },
    "termsOfService": "https://developers.google.com/terms/",
    "title": "Google Analytics Data API",
    "version": "v1beta"
  },
  "paths": {
    "/v1beta/properties/{property}/metadata": {
      "get": {
        "description": "Returns dimensions and metrics available for reporting methods like 'runReport'. Used to explore the dimensions and metrics.",
        "operationId": "getMetadata",
        "parameters": [
          {
            "description": "A Google Analytics GA4 property identifier whose events are tracked. Example: 1234",
            "in": "path",
            "name": "property",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Metadata"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/analytics.readonly"
            ]
          }
        ]
      }
    },
    "/v1beta/properties/{property}:runReport": {
      "post": {
        "description": "Returns a report of your Analytics property event data.Metrics are individual measurements of user activity,such as active users or event count.Dimensions break down metrics across some common criteria,such as country or event name.Metrics/Dimensions can be obtained from the 'getMetadata' request.",
        "operationId": "runReport",
        "parameters": [
          {
            "description": "A Google Analytics GA4 property identifier whose events are tracked. Example: 1234",
            "in": "path",
            "name": "property",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunReportResponse"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/analytics.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ActiveMetricRestriction": {
        "description": "A metric actively restricted in creating the report.",
        "properties": {
          "metricName": {
            "description": "The name of the restricted metric.",
            "type": "string"
          },
          "restrictedMetricTypes": {
            "description": "The reason for this metric's restriction.",
            "items": {
              "enum": [
                "RESTRICTED_METRIC_TYPE_UNSPECIFIED",
                "COST_DATA",
                "REVENUE_DATA"
              ],
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "CaseExpression": {
        "description": "Used to convert a dimension value to a single case.",
        "properties": {
          "dimensionName": {
            "description": "Name of a dimension. The name must refer back to a name in dimensions field of the request.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Cohort": {
        "description": "Defines a cohort selection criteria. A cohort is a group of users who share a common characteristic. For example, users with the same `firstSessionDate` belong to the same cohort.",
        "properties": {
          "dateRange": {
            "$ref": "#/components/schemas/DateRange"
          },
          "dimension": {
            "description": "Dimension used by the cohort. Required and only supports `firstSessionDate`.",
            "type": "string"
          },
          "name": {
            "description": "Assigns a name to this cohort. The dimension `cohort` is valued to this name in a report response. If set, cannot begin with `cohort_` or `RESERVED_`. If not set, cohorts are named by their zero based index `cohort_0`, `cohort_1`, etc.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CohortReportSettings": {
        "description": "Optional settings of a cohort report.",
        "properties": {
          "accumulate": {
            "description": "If true, accumulates the result from first touch day to the end day. Not supported in `RunReportRequest`.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CohortSpec": {
        "description": "The specification of cohorts for a cohort report. Cohort reports create a time series of user retention for the cohort. For example, you could select the cohort of users that were acquired in the first week of September and follow that cohort for the next six weeks. Selecting the users acquired in the first week of September cohort is specified in the `cohort` object. Following that cohort for the next six weeks is specified in the `cohortsRange` object. The report response could show a weekly time series where say your app has retained 60% of this cohort after three weeks and 25% of this cohort after six weeks. These two percentages can be calculated by the metric `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report.",
        "properties": {
          "cohortReportSettings": {
            "$ref": "#/components/schemas/CohortReportSettings"
          },
          "cohorts": {
            "items": {
              "$ref": "#/components/schemas/Cohort"
            },
            "type": "array"
          },
          "cohortsRange": {
            "$ref": "#/components/schemas/CohortsRange"
          }
        },
        "type": "object"
      },
      "CohortsRange": {
        "description": "Configures the extended reporting date range for a cohort report. Specifies an offset duration to follow the cohorts over.",
        "properties": {
          "endOffset": {
            "description": "Required. `endOffset` specifies the end date of the extended reporting date range for a cohort report. `endOffset` can be any positive integer but is commonly set to 5 to 10 so that reports contain data on the cohort for the next several granularity time periods. If `granularity` is `DAILY`, the `endDate` of the extended reporting date range is `endDate` of the cohort plus `endOffset` days. If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date range is `endDate` of the cohort plus `endOffset * 7` days. If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date range is `endDate` of the cohort plus `endOffset * 30` days.",
            "format": "int32",
            "type": "integer"
          },
          "granularity": {
            "description": "Required. The granularity used to interpret the `startOffset` and `endOffset` for the extended reporting date range for a cohort report.",
            "enum": [
              "GRANULARITY_UNSPECIFIED",
              "DAILY",
              "WEEKLY",
              "MONTHLY"
            ],
            "type": "string"
          },
          "startOffset": {
            "description": "`startOffset` specifies the start date of the extended reporting date range for a cohort report. `startOffset` is commonly set to 0 so that reports contain data from the acquisition of the cohort forward. If `granularity` is `DAILY`, the `startDate` of the extended reporting date range is `startDate` of the cohort plus `startOffset` days. If `granularity` is `WEEKLY`, the `startDate` of the extended reporting date range is `startDate` of the cohort plus `startOffset * 7` days. If `granularity` is `MONTHLY`, the `startDate` of the extended reporting date range is `startDate` of the cohort plus `startOffset * 30` days.",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ConcatenateExpression": {
        "description": "Used to combine dimension values to a single dimension.",
        "properties": {
          "delimiter": {
            "description": "The delimiter placed between dimension names. Delimiters are often single characters such as \"|\" or \",\" but can be longer strings. If a dimension value contains the delimiter, both will be present in response with no distinction. For example if dimension 1 value = \"US,FR\", dimension 2 value = \"JP\", and delimiter = \",\", then the response will contain \"US,FR,JP\".",
            "type": "string"
          },
          "dimensionNames": {
            "description": "Names of dimensions. The names must refer back to names in the dimensions field of the request.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "DateRange": {
        "description": "A contiguous set of days: `startDate`, `startDate + 1`, ..., `endDate`. Requests are allowed up to 4 date ranges.",
        "properties": {
          "endDate": {
            "description": "The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property's reporting time zone.",
            "type": "string"
          },
          "startDate": {
            "description": "The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property's reporting time zone.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Dimension": {
        "description": "Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, the city could be \"Paris\" or \"New York\". Requests are allowed up to 9 dimensions. Dimension names should be obtained from the getMetadata operation.",
        "properties": {
          "dimensionExpression": {
            "$ref": "#/components/schemas/DimensionExpression",
            "description": "One dimension can be the result of an expression of multiple dimensions. For example, dimension \"country, city\": concatenate(country, \", \", city)."
          },
          "name": {
            "description": "The name of the dimension. Dimension names that you choose must match the regular expression `^[a-zA-Z0-9_]$`.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DimensionCompatibility": {
        "description": "The compatibility for a single dimension.",
        "properties": {
          "compatibility": {
            "description": "The compatibility of this dimension. If the compatibility is COMPATIBLE, this dimension can be successfully added to the report.",
            "enum": [
              "COMPATIBILITY_UNSPECIFIED",
              "COMPATIBLE",
              "INCOMPATIBLE"
            ],
            "type": "string"
          },
          "dimensionMetadata": {
            "$ref": "#/components/schemas/DimensionMetadata"
          }
        },
        "type": "object"
      },
      "DimensionExpression": {
        "description": "Used to express a dimension which is the result of a formula of multiple dimensions. Example usages: 1) lower_case(dimension) 2) concatenate(dimension1, symbol, dimension2).",
        "properties": {
          "concatenate": {
            "$ref": "#/components/schemas/ConcatenateExpression",
            "description": "Used to combine dimension values to a single dimension. For example, dimension \"country, city\": concatenate(country, \", \", city)."
          },
          "lowerCase": {
            "$ref": "#/components/schemas/CaseExpression",
            "description": "Used to convert a dimension value to lower case."
          },
          "upperCase": {
            "$ref": "#/components/schemas/CaseExpression",
            "description": "Used to convert a dimension value to upper case."
          }
        },
        "type": "object"
      },
      "DimensionHeader": {
        "description": "Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers.",
        "properties": {
          "name": {
            "description": "The dimension's name.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DimensionMetadata": {
        "description": "Explains a dimension.",
        "properties": {
          "apiName": {
            "description": "The name of the dimension. For example, 'eventName'. The dimension name e.g. 'eventName' should be used as a 'name' field in the reporting methods like 'runReport'. Usage example in 'runReport' request: \"dimensions\": [ { \"name\": \"eventName\" } ]",
            "type": "string"
          },
          "category": {
            "description": "The display name of the category that this dimension belongs to. Similar dimensions and metrics are categorized together.",
            "type": "string"
          },
          "customDefinition": {
            "description": "True if the dimension is a custom dimension for this property.",
            "type": "boolean"
          },
          "deprecatedApiNames": {
            "description": "Still usable but deprecated names for this dimension. If populated, this dimension is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the dimension will be available only by `apiName`.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": {
            "description": "Description of how this dimension is used and calculated.",
            "type": "string"
          },
          "uiName": {
            "description": "This dimension's name within the Google Analytics user interface. For example, `Event name`.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DimensionOrderBy": {
        "description": "Sorts by dimension values.",
        "properties": {
          "dimensionName": {
            "description": "A dimension name in the request to order by.",
            "type": "string"
          },
          "orderType": {
            "description": "Controls the rule for dimension value ordering.",
            "enum": [
              "ORDER_TYPE_UNSPECIFIED",
              "ALPHANUMERIC",
              "CASE_INSENSITIVE_ALPHANUMERIC",
              "NUMERIC"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "DimensionValue": {
        "description": "The value of a dimension.",
        "properties": {
          "value": {
            "description": "Value as a string if the dimension type is a string.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Metadata": {
        "description": "The dimensions, metrics and comparisons currently accepted in reporting methods.",
        "properties": {
          "dimensions": {
            "description": "The dimension descriptions.",
            "items": {
              "$ref": "#/components/schemas/DimensionMetadata"
            },
            "type": "array"
          },
          "metrics": {
            "description": "The metric descriptions.",
            "items": {
              "$ref": "#/components/schemas/MetricMetadata"
            },
            "type": "array"
          },
          "name": {
            "description": "Resource name of this metadata.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Metric": {
        "description": "The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics. Metric names should be obtained from the getMetadata operation.",
        "properties": {
          "name": {
            "description": "The name of the metric. Metric names that you choose must match the regular expression `^[a-zA-Z0-9_]$`.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MetricCompatibility": {
        "description": "The compatibility for a single metric.",
        "properties": {
          "compatibility": {
            "description": "The compatibility of this metric. If the compatibility is COMPATIBLE, this metric can be successfully added to the report.",
            "enum": [
              "COMPATIBILITY_UNSPECIFIED",
              "COMPATIBLE",
              "INCOMPATIBLE"
            ],
            "type": "string"
          },
          "metricMetadata": {
            "$ref": "#/components/schemas/MetricMetadata"
          }
        },
        "type": "object"
      },
      "MetricHeader": {
        "description": "Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.",
        "properties": {
          "name": {
            "description": "The metric's name.",
            "type": "string"
          },
          "type": {
            "description": "The metric's data type.",
            "enum": [
              "METRIC_TYPE_UNSPECIFIED",
              "TYPE_INTEGER",
              "TYPE_FLOAT",
              "TYPE_SECONDS",
              "TYPE_MILLISECONDS",
              "TYPE_MINUTES",
              "TYPE_HOURS",
              "TYPE_STANDARD",
              "TYPE_CURRENCY",
              "TYPE_FEET",
              "TYPE_MILES",
              "TYPE_METERS",
              "TYPE_KILOMETERS"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "MetricMetadata": {
        "description": "Explains a metric.",
        "properties": {
          "apiName": {
            "description": "The name of the metric. For example, 'eventCount'. The metric name e.g. 'eventCount' should be used as a 'name' field in the reporting methods like 'runReport'. Usage example in 'runReport' request: \"metrics\": [ { \"name\": \"eventCount\" } ]",
            "type": "string"
          },
          "blockedReasons": {
            "description": "If reasons are specified, your access is blocked to this metric for this property. API requests from you to this property for this metric will succeed; however, the report will contain only zeros for this metric. API requests with metric filters on blocked metrics will fail. If reasons are empty, you have access to this metric. To learn more, see [Access and data-restriction management](https://support.google.com/analytics/answer/10851388).",
            "items": {
              "enum": [
                "BLOCKED_REASON_UNSPECIFIED",
                "NO_REVENUE_METRICS",
                "NO_COST_METRICS"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "category": {
            "description": "The display name of the category that this metrics belongs to. Similar dimensions and metrics are categorized together.",
            "type": "string"
          },
          "customDefinition": {
            "description": "True if the metric is a custom metric for this property.",
            "type": "boolean"
          },
          "deprecatedApiNames": {
            "description": "Still usable but deprecated names for this metric. If populated, this metric is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the metric will be available only by `apiName`.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": {
            "description": "Description of how this metric is used and calculated.",
            "type": "string"
          },
          "type": {
            "description": "The type of this metric.",
            "enum": [
              "METRIC_TYPE_UNSPECIFIED",
              "TYPE_INTEGER",
              "TYPE_FLOAT",
              "TYPE_SECONDS",
              "TYPE_MILLISECONDS",
              "TYPE_MINUTES",
              "TYPE_HOURS",
              "TYPE_STANDARD",
              "TYPE_CURRENCY",
              "TYPE_FEET",
              "TYPE_MILES",
              "TYPE_METERS",
              "TYPE_KILOMETERS"
            ],
            "type": "string"
          },
          "uiName": {
            "description": "This metric's name within the Google Analytics user interface. For example, `Event count`.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MetricOrderBy": {
        "description": "Sorts by metric values.",
        "properties": {
          "metricName": {
            "description": "A metric name in the request to order by.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MetricValue": {
        "description": "The value of a metric.",
        "properties": {
          "value": {
            "description": "Measurement value. See MetricHeader for type.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MinuteRange": {
        "description": "A contiguous set of minutes: `startMinutesAgo`, `startMinutesAgo + 1`, ..., `endMinutesAgo`. Requests are allowed up to 2 minute ranges.",
        "properties": {
          "endMinutesAgo": {
            "description": "The inclusive end minute for the query as a number of minutes before now. Cannot be before `startMinutesAgo`. For example, `\"endMinutesAgo\": 15` specifies the report should include event data from prior to 15 minutes ago. If unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics properties can request any minute in the last 30 minutes of event data (`endMinutesAgo <= 29`), and 360 Analytics properties can request any minute in the last 60 minutes of event data (`endMinutesAgo <= 59`).",
            "format": "int32",
            "type": "integer"
          },
          "name": {
            "description": "Assigns a name to this minute range. The dimension `dateRange` is valued to this name in a report response. If set, cannot begin with `date_range_` or `RESERVED_`. If not set, minute ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.",
            "type": "string"
          },
          "startMinutesAgo": {
            "description": "The inclusive start minute for the query as a number of minutes before now. For example, `\"startMinutesAgo\": 29` specifies the report should include event data from 29 minutes ago and after. Cannot be after `endMinutesAgo`. If unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics properties can request up to the last 30 minutes of event data (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to the last 60 minutes of event data (`startMinutesAgo <= 59`).",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "NumericValue": {
        "description": "To represent a number.",
        "properties": {
          "doubleValue": {
            "description": "Double value",
            "format": "double",
            "type": "number"
          },
          "int64Value": {
            "description": "Integer value",
            "format": "int64",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PropertyQuota": {
        "description": "Current state of all quotas for this Analytics Property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors.",
        "properties": {
          "concurrentRequests": {
            "$ref": "#/components/schemas/QuotaStatus"
          },
          "potentiallyThresholdedRequestsPerHour": {
            "$ref": "#/components/schemas/QuotaStatus"
          },
          "serverErrorsPerProjectPerHour": {
            "$ref": "#/components/schemas/QuotaStatus"
          },
          "tokensPerDay": {
            "$ref": "#/components/schemas/QuotaStatus"
          },
          "tokensPerHour": {
            "$ref": "#/components/schemas/QuotaStatus"
          },
          "tokensPerProjectPerHour": {
            "$ref": "#/components/schemas/QuotaStatus"
          }
        },
        "type": "object"
      },
      "QuotaStatus": {
        "description": "Current state for a particular quota group.",
        "properties": {
          "consumed": {
            "description": "Quota consumed by this request.",
            "format": "int32",
            "type": "integer"
          },
          "remaining": {
            "description": "Quota remaining after this request.",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ResponseMetaData": {
        "description": "Response's metadata carrying additional information about the report content.",
        "properties": {
          "currencyCode": {
            "description": "The currency code used in this report. Intended to be used in formatting currency metrics like `purchaseRevenue` for visualization. If currency_code was specified in the request, this response parameter will echo the request parameter; otherwise, this response parameter is the property's current currency_code. Currency codes are string encodings of currency types from the ISO 4217 standard (https://en.wikipedia.org/wiki/ISO_4217); for example \"USD\", \"EUR\", \"JPY\". To learn more, see https://support.google.com/analytics/answer/9796179.",
            "type": "string"
          },
          "dataLossFromOtherRow": {
            "description": "If true, indicates some buckets of dimension combinations are rolled into \"(other)\" row. This can happen for high cardinality reports. The metadata parameter dataLossFromOtherRow is populated based on the aggregated data table used in the report. The parameter will be accurately populated regardless of the filters and limits in the report. For example, the (other) row could be dropped from the report because the request contains a filter on sessionSource = google. This parameter will still be populated if data loss from other row was present in the input aggregate data used to generate this report. To learn more, see [About the (other) row and data sampling](https://support.google.com/analytics/answer/13208658#reports).",
            "type": "boolean"
          },
          "emptyReason": {
            "description": "If empty reason is specified, the report is empty for this reason.",
            "type": "string"
          },
          "samplingMetadatas": {
            "description": "If this report results is [sampled](https://support.google.com/analytics/answer/13331292), this describes the percentage of events used in this report. One `samplingMetadatas` is populated for each date range. Each `samplingMetadatas` corresponds to a date range in order that date ranges were specified in the request. However if the results are not sampled, this field will not be defined.",
            "items": {
              "$ref": "#/components/schemas/SamplingMetadata"
            },
            "type": "array"
          },
          "schemaRestrictionResponse": {
            "$ref": "#/components/schemas/SchemaRestrictionResponse"
          },
          "subjectToThresholding": {
            "description": "If `subjectToThresholding` is true, this report is subject to thresholding and only returns data that meets the minimum aggregation thresholds. It is possible for a request to be subject to thresholding thresholding and no data is absent from the report, and this happens when all data is above the thresholds. To learn more, see [Data thresholds](https://support.google.com/analytics/answer/9383630).",
            "type": "boolean"
          },
          "timeZone": {
            "description": "The property's current timezone. Intended to be used to interpret time-based dimensions like `hour` and `minute`. Formatted as strings from the IANA Time Zone database (https://www.iana.org/time-zones); for example \"America/New_York\" or \"Asia/Tokyo\".",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Row": {
        "description": "Report data for each row. For example if RunReportRequest contains: ```none \"dimensions\": [ { \"name\": \"eventName\" }, { \"name\": \"countryId\" } ], \"metrics\": [ { \"name\": \"eventCount\" } ] ``` One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and 15 as the eventCount, would be: ```none \"dimensionValues\": [ { \"value\": \"in_app_purchase\" }, { \"value\": \"JP\" } ], \"metricValues\": [ { \"value\": \"15\" } ] ```",
        "properties": {
          "dimensionValues": {
            "description": "List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.",
            "items": {
              "$ref": "#/components/schemas/DimensionValue"
            },
            "type": "array"
          },
          "metricValues": {
            "description": "List of requested visible metric values.",
            "items": {
              "$ref": "#/components/schemas/MetricValue"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "RunReportRequest": {
        "description": "The request to generate a report.",
        "required": [
          "keepEmptyRows"
        ],
        "properties": {
          "cohortSpec": {
            "$ref": "#/components/schemas/CohortSpec"
          },
          "currencyCode": {
            "description": "A currency code in ISO4217 format, such as \"AED\", \"USD\", \"JPY\". If the field is empty, the report uses the property's default currency.",
            "type": "string"
          },
          "dateRanges": {
            "description": "Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this `dateRanges` must be unspecified.",
            "items": {
              "$ref": "#/components/schemas/DateRange"
            },
            "type": "array"
          },
          "dimensions": {
            "description": "The dimensions requested and displayed.",
            "items": {
              "$ref": "#/components/schemas/Dimension"
            },
            "type": "array"
          },
          "keepEmptyRows": {
            "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. Regardless of this `keep_empty_rows` setting, only data recorded by the Google Analytics (GA4) property can be displayed in a report. For example if a property never logs a `purchase` event, then a query for the `eventName` dimension and `eventCount` metric will not have a row eventName: \"purchase\" and eventCount: 0.",
            "type": "boolean",
            "default": true
          },
          "limit": {
            "description": "The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for. `limit` must be positive. The API can also return fewer rows than the requested `limit`, if there aren't as many dimension values as the `limit`. For instance, there are fewer than 300 possible values for the dimension `country`, so when reporting on only `country`, you can't get more than 300 rows, even if you set `limit` to a higher value.",
            "format": "int64",
            "type": "string"
          },
          "metricAggregations": {
            "description": "Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to \"RESERVED_(MetricAggregation)\".",
            "items": {
              "enum": [
                "METRIC_AGGREGATION_UNSPECIFIED",
                "TOTAL",
                "MINIMUM",
                "MAXIMUM",
                "COUNT"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "metrics": {
            "description": "The metrics requested and displayed.",
            "items": {
              "$ref": "#/components/schemas/Metric"
            },
            "type": "array"
          },
          "offset": {
            "description": "The row count of the start row. The first row is counted as row 0. When paging, the first request does not specify offset; or equivalently, sets offset to 0; the first request returns the first `limit` of rows. The second request sets offset to the `limit` of the first request; the second request returns the second `limit` of rows.",
            "format": "int64",
            "type": "string"
          },
          "returnPropertyQuota": {
            "description": "Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "RunReportResponse": {
        "description": "The response report table corresponding to a request.",
        "properties": {
          "dimensionHeaders": {
            "description": "Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.",
            "items": {
              "$ref": "#/components/schemas/DimensionHeader"
            },
            "type": "array"
          },
          "kind": {
            "description": "Identifies what kind of resource this message is. This `kind` is always the fixed string \"analyticsData#runReport\". Useful to distinguish between response types in JSON.",
            "type": "string"
          },
          "maximums": {
            "description": "If requested, the maximum values of metrics.",
            "items": {
              "$ref": "#/components/schemas/Row"
            },
            "type": "array"
          },
          "metadata": {
            "$ref": "#/components/schemas/ResponseMetaData"
          },
          "metricHeaders": {
            "description": "Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.",
            "items": {
              "$ref": "#/components/schemas/MetricHeader"
            },
            "type": "array"
          },
          "minimums": {
            "description": "If requested, the minimum values of metrics.",
            "items": {
              "$ref": "#/components/schemas/Row"
            },
            "type": "array"
          },
          "propertyQuota": {
            "$ref": "#/components/schemas/PropertyQuota"
          },
          "rowCount": {
            "description": "The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response, the `limit` request parameter, and the `offset` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows.",
            "format": "int32",
            "type": "integer"
          },
          "rows": {
            "description": "Rows of dimension value combinations and metric values in the report.",
            "items": {
              "$ref": "#/components/schemas/Row"
            },
            "type": "array"
          },
          "totals": {
            "description": "If requested, the totaled values of metrics.",
            "items": {
              "$ref": "#/components/schemas/Row"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SamplingMetadata": {
        "description": "If this report results is [sampled](https://support.google.com/analytics/answer/13331292), this describes the percentage of events used in this report. Sampling is the practice of analyzing a subset of all data in order to uncover the meaningful information in the larger data set.",
        "properties": {
          "samplesReadCount": {
            "description": "The total number of events read in this sampled report for a date range. This is the size of the subset this property's data that was analyzed in this report.",
            "format": "int64",
            "type": "string"
          },
          "samplingSpaceSize": {
            "description": "The total number of events present in this property's data that could have been analyzed in this report for a date range. Sampling uncovers the meaningful information about the larger data set, and this is the size of the larger data set. To calculate the percentage of available data that was used in this report, compute `samplesReadCount/samplingSpaceSize`.",
            "format": "int64",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SchemaRestrictionResponse": {
        "description": "The schema restrictions actively enforced in creating this report. To learn more, see [Access and data-restriction management](https://support.google.com/analytics/answer/10851388).",
        "properties": {
          "activeMetricRestrictions": {
            "description": "All restrictions actively enforced in creating the report. For example, `purchaseRevenue` always has the restriction type `REVENUE_DATA`. However, this active response restriction is only populated if the user's custom role disallows access to `REVENUE_DATA`.",
            "items": {
              "$ref": "#/components/schemas/ActiveMetricRestriction"
            },
            "type": "array"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "Oauth2": {
        "description": "Oauth 2.0 implicit authentication",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://webanalyticsbuddy.cannyweb.co.uk/auth",
            "scopes": {
              "https://www.googleapis.com/auth/analytics": "View and manage your Google Analytics data",
              "https://www.googleapis.com/auth/analytics.readonly": "See and download your Google Analytics data"
            }
          }
        },
        "type": "oauth2"
      }
    }
  }
}