1{ 2 "auth": { 3 "oauth2": { 4 "scopes": { 5 "https://www.googleapis.com/auth/analytics": { 6 "description": "View and manage your Google Analytics data" 7 }, 8 "https://www.googleapis.com/auth/analytics.readonly": { 9 "description": "See and download your Google Analytics data" 10 } 11 } 12 } 13 }, 14 "basePath": "", 15 "baseUrl": "https://analyticsdata.googleapis.com/", 16 "batchPath": "batch", 17 "canonicalName": "AnalyticsData", 18 "description": "Accesses report data in Google Analytics.", 19 "discoveryVersion": "v1", 20 "documentationLink": "https://developers.google.com/analytics/devguides/reporting/data/v1/", 21 "fullyEncodeReservedExpansion": true, 22 "icons": { 23 "x16": "http://www.google.com/images/icons/product/search-16.gif", 24 "x32": "http://www.google.com/images/icons/product/search-32.gif" 25 }, 26 "id": "analyticsdata:v1alpha", 27 "kind": "discovery#restDescription", 28 "mtlsRootUrl": "https://analyticsdata.mtls.googleapis.com/", 29 "name": "analyticsdata", 30 "ownerDomain": "google.com", 31 "ownerName": "Google", 32 "parameters": { 33 "$.xgafv": { 34 "description": "V1 error format.", 35 "enum": [ 36 "1", 37 "2" 38 ], 39 "enumDescriptions": [ 40 "v1 error format", 41 "v2 error format" 42 ], 43 "location": "query", 44 "type": "string" 45 }, 46 "access_token": { 47 "description": "OAuth access token.", 48 "location": "query", 49 "type": "string" 50 }, 51 "alt": { 52 "default": "json", 53 "description": "Data format for response.", 54 "enum": [ 55 "json", 56 "media", 57 "proto" 58 ], 59 "enumDescriptions": [ 60 "Responses with Content-Type of application/json", 61 "Media download with context-dependent Content-Type", 62 "Responses with Content-Type of application/x-protobuf" 63 ], 64 "location": "query", 65 "type": "string" 66 }, 67 "callback": { 68 "description": "JSONP", 69 "location": "query", 70 "type": "string" 71 }, 72 "fields": { 73 "description": "Selector specifying which fields to include in a partial response.", 74 "location": "query", 75 "type": "string" 76 }, 77 "key": { 78 "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", 79 "location": "query", 80 "type": "string" 81 }, 82 "oauth_token": { 83 "description": "OAuth 2.0 token for the current user.", 84 "location": "query", 85 "type": "string" 86 }, 87 "prettyPrint": { 88 "default": "true", 89 "description": "Returns response with indentations and line breaks.", 90 "location": "query", 91 "type": "boolean" 92 }, 93 "quotaUser": { 94 "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", 95 "location": "query", 96 "type": "string" 97 }, 98 "uploadType": { 99 "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", 100 "location": "query", 101 "type": "string" 102 }, 103 "upload_protocol": { 104 "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", 105 "location": "query", 106 "type": "string" 107 } 108 }, 109 "protocol": "rest", 110 "resources": { 111 "properties": { 112 "methods": { 113 "getMetadata": { 114 "description": "Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics GA4 Property Identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", 115 "flatPath": "v1alpha/properties/{propertiesId}/metadata", 116 "httpMethod": "GET", 117 "id": "analyticsdata.properties.getMetadata", 118 "parameterOrder": [ 119 "name" 120 ], 121 "parameters": { 122 "name": { 123 "description": "Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics GA4 Property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.", 124 "location": "path", 125 "pattern": "^properties/[^/]+/metadata$", 126 "required": true, 127 "type": "string" 128 } 129 }, 130 "path": "v1alpha/{+name}", 131 "response": { 132 "$ref": "Metadata" 133 }, 134 "scopes": [ 135 "https://www.googleapis.com/auth/analytics", 136 "https://www.googleapis.com/auth/analytics.readonly" 137 ] 138 }, 139 "runRealtimeReport": { 140 "description": "The Google Analytics Realtime API returns a customized report of realtime event data for your property. These reports show events and usage from the last 30 minutes.", 141 "flatPath": "v1alpha/properties/{propertiesId}:runRealtimeReport", 142 "httpMethod": "POST", 143 "id": "analyticsdata.properties.runRealtimeReport", 144 "parameterOrder": [ 145 "property" 146 ], 147 "parameters": { 148 "property": { 149 "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234", 150 "location": "path", 151 "pattern": "^properties/[^/]+$", 152 "required": true, 153 "type": "string" 154 } 155 }, 156 "path": "v1alpha/{+property}:runRealtimeReport", 157 "request": { 158 "$ref": "RunRealtimeReportRequest" 159 }, 160 "response": { 161 "$ref": "RunRealtimeReportResponse" 162 }, 163 "scopes": [ 164 "https://www.googleapis.com/auth/analytics", 165 "https://www.googleapis.com/auth/analytics.readonly" 166 ] 167 } 168 } 169 }, 170 "v1alpha": { 171 "methods": { 172 "batchRunPivotReports": { 173 "description": "Returns multiple pivot reports in a batch. All reports must be for the same Entity.", 174 "flatPath": "v1alpha:batchRunPivotReports", 175 "httpMethod": "POST", 176 "id": "analyticsdata.batchRunPivotReports", 177 "parameterOrder": [], 178 "parameters": {}, 179 "path": "v1alpha:batchRunPivotReports", 180 "request": { 181 "$ref": "BatchRunPivotReportsRequest" 182 }, 183 "response": { 184 "$ref": "BatchRunPivotReportsResponse" 185 }, 186 "scopes": [ 187 "https://www.googleapis.com/auth/analytics", 188 "https://www.googleapis.com/auth/analytics.readonly" 189 ] 190 }, 191 "batchRunReports": { 192 "description": "Returns multiple reports in a batch. All reports must be for the same Entity.", 193 "flatPath": "v1alpha:batchRunReports", 194 "httpMethod": "POST", 195 "id": "analyticsdata.batchRunReports", 196 "parameterOrder": [], 197 "parameters": {}, 198 "path": "v1alpha:batchRunReports", 199 "request": { 200 "$ref": "BatchRunReportsRequest" 201 }, 202 "response": { 203 "$ref": "BatchRunReportsResponse" 204 }, 205 "scopes": [ 206 "https://www.googleapis.com/auth/analytics", 207 "https://www.googleapis.com/auth/analytics.readonly" 208 ] 209 }, 210 "runPivotReport": { 211 "description": "Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.", 212 "flatPath": "v1alpha:runPivotReport", 213 "httpMethod": "POST", 214 "id": "analyticsdata.runPivotReport", 215 "parameterOrder": [], 216 "parameters": {}, 217 "path": "v1alpha:runPivotReport", 218 "request": { 219 "$ref": "RunPivotReportRequest" 220 }, 221 "response": { 222 "$ref": "RunPivotReportResponse" 223 }, 224 "scopes": [ 225 "https://www.googleapis.com/auth/analytics", 226 "https://www.googleapis.com/auth/analytics.readonly" 227 ] 228 }, 229 "runReport": { 230 "description": "Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name.", 231 "flatPath": "v1alpha:runReport", 232 "httpMethod": "POST", 233 "id": "analyticsdata.runReport", 234 "parameterOrder": [], 235 "parameters": {}, 236 "path": "v1alpha:runReport", 237 "request": { 238 "$ref": "RunReportRequest" 239 }, 240 "response": { 241 "$ref": "RunReportResponse" 242 }, 243 "scopes": [ 244 "https://www.googleapis.com/auth/analytics", 245 "https://www.googleapis.com/auth/analytics.readonly" 246 ] 247 } 248 } 249 } 250 }, 251 "revision": "20210206", 252 "rootUrl": "https://analyticsdata.googleapis.com/", 253 "schemas": { 254 "BatchRunPivotReportsRequest": { 255 "description": "The batch request containing multiple pivot report requests.", 256 "id": "BatchRunPivotReportsRequest", 257 "properties": { 258 "entity": { 259 "$ref": "Entity", 260 "description": "A property whose events are tracked. This entity must be specified for the batch. The entity within RunPivotReportRequest may either be unspecified or consistent with this entity." 261 }, 262 "requests": { 263 "description": "Individual requests. Each request has a separate pivot report response. Each batch request is allowed up to 5 requests.", 264 "items": { 265 "$ref": "RunPivotReportRequest" 266 }, 267 "type": "array" 268 } 269 }, 270 "type": "object" 271 }, 272 "BatchRunPivotReportsResponse": { 273 "description": "The batch response containing multiple pivot reports.", 274 "id": "BatchRunPivotReportsResponse", 275 "properties": { 276 "pivotReports": { 277 "description": "Individual responses. Each response has a separate pivot report request.", 278 "items": { 279 "$ref": "RunPivotReportResponse" 280 }, 281 "type": "array" 282 } 283 }, 284 "type": "object" 285 }, 286 "BatchRunReportsRequest": { 287 "description": "The batch request containing multiple report requests.", 288 "id": "BatchRunReportsRequest", 289 "properties": { 290 "entity": { 291 "$ref": "Entity", 292 "description": "A property whose events are tracked. This entity must be specified for the batch. The entity within RunReportRequest may either be unspecified or consistent with this entity." 293 }, 294 "requests": { 295 "description": "Individual requests. Each request has a separate report response. Each batch request is allowed up to 5 requests.", 296 "items": { 297 "$ref": "RunReportRequest" 298 }, 299 "type": "array" 300 } 301 }, 302 "type": "object" 303 }, 304 "BatchRunReportsResponse": { 305 "description": "The batch response containing multiple reports.", 306 "id": "BatchRunReportsResponse", 307 "properties": { 308 "reports": { 309 "description": "Individual responses. Each response has a separate report request.", 310 "items": { 311 "$ref": "RunReportResponse" 312 }, 313 "type": "array" 314 } 315 }, 316 "type": "object" 317 }, 318 "BetweenFilter": { 319 "description": "To express that the result needs to be between two numbers (inclusive).", 320 "id": "BetweenFilter", 321 "properties": { 322 "fromValue": { 323 "$ref": "NumericValue", 324 "description": "Begins with this number." 325 }, 326 "toValue": { 327 "$ref": "NumericValue", 328 "description": "Ends with this number." 329 } 330 }, 331 "type": "object" 332 }, 333 "CaseExpression": { 334 "description": "Used to convert a dimension value to a single case.", 335 "id": "CaseExpression", 336 "properties": { 337 "dimensionName": { 338 "description": "Name of a dimension. The name must refer back to a name in dimensions field of the request.", 339 "type": "string" 340 } 341 }, 342 "type": "object" 343 }, 344 "Cohort": { 345 "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.", 346 "id": "Cohort", 347 "properties": { 348 "dateRange": { 349 "$ref": "DateRange", 350 "description": "The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`. This `dateRange` does not specify the full date range of event data that is present in a cohort report. In a cohort report, this `dateRange` is extended by the granularity and offset present in the `cohortsRange`; event data for the extended reporting date range is present in a cohort report. In a cohort request, this `dateRange` is required and the `dateRanges` in the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. This `dateRange` should generally be aligned with the cohort's granularity. If `CohortsRange` uses daily granularity, this `dateRange` can be a single day. If `CohortsRange` uses weekly granularity, this `dateRange` can be aligned to a week boundary, starting at Sunday and ending Saturday. If `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to a month, starting at the first and ending on the last day of the month." 351 }, 352 "dimension": { 353 "description": "Dimension used by the cohort. Required and only supports `firstSessionDate`.", 354 "type": "string" 355 }, 356 "name": { 357 "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.", 358 "type": "string" 359 } 360 }, 361 "type": "object" 362 }, 363 "CohortReportSettings": { 364 "description": "Optional settings of a cohort report.", 365 "id": "CohortReportSettings", 366 "properties": { 367 "accumulate": { 368 "description": "If true, accumulates the result from first touch day to the end day. Not supported in `RunReportRequest`.", 369 "type": "boolean" 370 } 371 }, 372 "type": "object" 373 }, 374 "CohortSpec": { 375 "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. For examples, see [Cohort Report Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). 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.", 376 "id": "CohortSpec", 377 "properties": { 378 "cohortReportSettings": { 379 "$ref": "CohortReportSettings", 380 "description": "Optional settings for a cohort report." 381 }, 382 "cohorts": { 383 "description": "Defines the selection criteria to group users into cohorts. Most cohort reports define only a single cohort. If multiple cohorts are specified, each cohort can be recognized in the report by their name.", 384 "items": { 385 "$ref": "Cohort" 386 }, 387 "type": "array" 388 }, 389 "cohortsRange": { 390 "$ref": "CohortsRange", 391 "description": "Cohort reports follow cohorts over an extended reporting date range. This range specifies an offset duration to follow the cohorts over." 392 } 393 }, 394 "type": "object" 395 }, 396 "CohortsRange": { 397 "description": "Configures the extended reporting date range for a cohort report. Specifies an offset duration to follow the cohorts over.", 398 "id": "CohortsRange", 399 "properties": { 400 "endOffset": { 401 "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.", 402 "format": "int32", 403 "type": "integer" 404 }, 405 "granularity": { 406 "description": "Required. The granularity used to interpret the `startOffset` and `endOffset` for the extended reporting date range for a cohort report.", 407 "enum": [ 408 "GRANULARITY_UNSPECIFIED", 409 "DAILY", 410 "WEEKLY", 411 "MONTHLY" 412 ], 413 "enumDescriptions": [ 414 "Should never be specified.", 415 "Daily granularity. Commonly used if the cohort's `dateRange` is a single day and the request contains `cohortNthDay`.", 416 "Weekly granularity. Commonly used if the cohort's `dateRange` is a week in duration (starting on Sunday and ending on Saturday) and the request contains `cohortNthWeek`.", 417 "Monthly granularity. Commonly used if the cohort's `dateRange` is a month in duration and the request contains `cohortNthMonth`." 418 ], 419 "type": "string" 420 }, 421 "startOffset": { 422 "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.", 423 "format": "int32", 424 "type": "integer" 425 } 426 }, 427 "type": "object" 428 }, 429 "ConcatenateExpression": { 430 "description": "Used to combine dimension values to a single dimension.", 431 "id": "ConcatenateExpression", 432 "properties": { 433 "delimiter": { 434 "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\".", 435 "type": "string" 436 }, 437 "dimensionNames": { 438 "description": "Names of dimensions. The names must refer back to names in the dimensions field of the request.", 439 "items": { 440 "type": "string" 441 }, 442 "type": "array" 443 } 444 }, 445 "type": "object" 446 }, 447 "DateRange": { 448 "description": "A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.", 449 "id": "DateRange", 450 "properties": { 451 "endDate": { 452 "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.", 453 "type": "string" 454 }, 455 "name": { 456 "description": "Assigns a name to this date 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, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.", 457 "type": "string" 458 }, 459 "startDate": { 460 "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.", 461 "type": "string" 462 } 463 }, 464 "type": "object" 465 }, 466 "Dimension": { 467 "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, city could be \"Paris\" or \"New York\". Requests are allowed up to 8 dimensions.", 468 "id": "Dimension", 469 "properties": { 470 "dimensionExpression": { 471 "$ref": "DimensionExpression", 472 "description": "One dimension can be the result of an expression of multiple dimensions. For example, dimension \"country, city\": concatenate(country, \", \", city)." 473 }, 474 "name": { 475 "description": "The name of the dimension. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names. If `dimensionExpression` is specified, `name` can be any string that you would like. For example if a `dimensionExpression` concatenates `country` and `city`, you could call that dimension `countryAndCity`. Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, `dimensionExpression`, and `pivots`.", 476 "type": "string" 477 } 478 }, 479 "type": "object" 480 }, 481 "DimensionExpression": { 482 "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).", 483 "id": "DimensionExpression", 484 "properties": { 485 "concatenate": { 486 "$ref": "ConcatenateExpression", 487 "description": "Used to combine dimension values to a single dimension. For example, dimension \"country, city\": concatenate(country, \", \", city)." 488 }, 489 "lowerCase": { 490 "$ref": "CaseExpression", 491 "description": "Used to convert a dimension value to lower case." 492 }, 493 "upperCase": { 494 "$ref": "CaseExpression", 495 "description": "Used to convert a dimension value to upper case." 496 } 497 }, 498 "type": "object" 499 }, 500 "DimensionHeader": { 501 "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.", 502 "id": "DimensionHeader", 503 "properties": { 504 "name": { 505 "description": "The dimension's name.", 506 "type": "string" 507 } 508 }, 509 "type": "object" 510 }, 511 "DimensionMetadata": { 512 "description": "Explains a dimension.", 513 "id": "DimensionMetadata", 514 "properties": { 515 "apiName": { 516 "description": "This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For example, `eventName`.", 517 "type": "string" 518 }, 519 "customDefinition": { 520 "description": "True if the dimension is a custom dimension for this property.", 521 "type": "boolean" 522 }, 523 "deprecatedApiNames": { 524 "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`.", 525 "items": { 526 "type": "string" 527 }, 528 "type": "array" 529 }, 530 "description": { 531 "description": "Description of how this dimension is used and calculated.", 532 "type": "string" 533 }, 534 "uiName": { 535 "description": "This dimension's name within the Google Analytics user interface. For example, `Event name`.", 536 "type": "string" 537 } 538 }, 539 "type": "object" 540 }, 541 "DimensionOrderBy": { 542 "description": "Sorts by dimension values.", 543 "id": "DimensionOrderBy", 544 "properties": { 545 "dimensionName": { 546 "description": "A dimension name in the request to order by.", 547 "type": "string" 548 }, 549 "orderType": { 550 "description": "Controls the rule for dimension value ordering.", 551 "enum": [ 552 "ORDER_TYPE_UNSPECIFIED", 553 "ALPHANUMERIC", 554 "CASE_INSENSITIVE_ALPHANUMERIC", 555 "NUMERIC" 556 ], 557 "enumDescriptions": [ 558 "Unspecified.", 559 "Alphanumeric sort by Unicode code point. For example, \"2\" < \"A\" < \"X\" < \"b\" < \"z\".", 560 "Case insensitive alphanumeric sort by lower case Unicode code point. For example, \"2\" < \"A\" < \"b\" < \"X\" < \"z\".", 561 "Dimension values are converted to numbers before sorting. For example in NUMERIC sort, \"25\" < \"100\", and in `ALPHANUMERIC` sort, \"100\" < \"25\". Non-numeric dimension values all have equal ordering value below all numeric values." 562 ], 563 "type": "string" 564 } 565 }, 566 "type": "object" 567 }, 568 "DimensionValue": { 569 "description": "The value of a dimension.", 570 "id": "DimensionValue", 571 "properties": { 572 "value": { 573 "description": "Value as a string if the dimension type is a string.", 574 "type": "string" 575 } 576 }, 577 "type": "object" 578 }, 579 "Entity": { 580 "description": "The unique identifier of the property whose events are tracked.", 581 "id": "Entity", 582 "properties": { 583 "propertyId": { 584 "description": "A Google Analytics GA4 property id. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).", 585 "type": "string" 586 } 587 }, 588 "type": "object" 589 }, 590 "Filter": { 591 "description": "An expression to filter dimension or metric values.", 592 "id": "Filter", 593 "properties": { 594 "betweenFilter": { 595 "$ref": "BetweenFilter", 596 "description": "A filter for two values." 597 }, 598 "fieldName": { 599 "description": "The dimension name or metric name. Must be a name defined in dimensions or metrics.", 600 "type": "string" 601 }, 602 "inListFilter": { 603 "$ref": "InListFilter", 604 "description": "A filter for in list values." 605 }, 606 "numericFilter": { 607 "$ref": "NumericFilter", 608 "description": "A filter for numeric or date values." 609 }, 610 "stringFilter": { 611 "$ref": "StringFilter", 612 "description": "Strings related filter." 613 } 614 }, 615 "type": "object" 616 }, 617 "FilterExpression": { 618 "description": "To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics.", 619 "id": "FilterExpression", 620 "properties": { 621 "andGroup": { 622 "$ref": "FilterExpressionList", 623 "description": "The FilterExpressions in and_group have an AND relationship." 624 }, 625 "filter": { 626 "$ref": "Filter", 627 "description": "A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics." 628 }, 629 "notExpression": { 630 "$ref": "FilterExpression", 631 "description": "The FilterExpression is NOT of not_expression." 632 }, 633 "orGroup": { 634 "$ref": "FilterExpressionList", 635 "description": "The FilterExpressions in or_group have an OR relationship." 636 } 637 }, 638 "type": "object" 639 }, 640 "FilterExpressionList": { 641 "description": "A list of filter expressions.", 642 "id": "FilterExpressionList", 643 "properties": { 644 "expressions": { 645 "description": "A list of filter expressions.", 646 "items": { 647 "$ref": "FilterExpression" 648 }, 649 "type": "array" 650 } 651 }, 652 "type": "object" 653 }, 654 "InListFilter": { 655 "description": "The result needs to be in a list of string values.", 656 "id": "InListFilter", 657 "properties": { 658 "caseSensitive": { 659 "description": "If true, the string value is case sensitive.", 660 "type": "boolean" 661 }, 662 "values": { 663 "description": "The list of string values. Must be non-empty.", 664 "items": { 665 "type": "string" 666 }, 667 "type": "array" 668 } 669 }, 670 "type": "object" 671 }, 672 "Metadata": { 673 "description": "The dimensions and metrics currently accepted in reporting methods.", 674 "id": "Metadata", 675 "properties": { 676 "dimensions": { 677 "description": "The dimension descriptions.", 678 "items": { 679 "$ref": "DimensionMetadata" 680 }, 681 "type": "array" 682 }, 683 "metrics": { 684 "description": "The metric descriptions.", 685 "items": { 686 "$ref": "MetricMetadata" 687 }, 688 "type": "array" 689 }, 690 "name": { 691 "description": "Resource name of this metadata.", 692 "type": "string" 693 } 694 }, 695 "type": "object" 696 }, 697 "Metric": { 698 "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.", 699 "id": "Metric", 700 "properties": { 701 "expression": { 702 "description": "A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.", 703 "type": "string" 704 }, 705 "invisible": { 706 "description": "Indicates if a metric is invisible in the report response. If a metric is invisible, the metric will not produce a column in the response, but can be used in `metricFilter`, `orderBys`, or a metric `expression`.", 707 "type": "boolean" 708 }, 709 "name": { 710 "description": "The name of the metric. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of metric names. If `expression` is specified, `name` can be any string that you would like. For example if `expression` is `screenPageViews/sessions`, you could call that metric's name = `viewsPerSession`. Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric `expression`.", 711 "type": "string" 712 } 713 }, 714 "type": "object" 715 }, 716 "MetricHeader": { 717 "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.", 718 "id": "MetricHeader", 719 "properties": { 720 "name": { 721 "description": "The metric's name.", 722 "type": "string" 723 }, 724 "type": { 725 "description": "The metric's data type.", 726 "enum": [ 727 "METRIC_TYPE_UNSPECIFIED", 728 "TYPE_INTEGER", 729 "TYPE_FLOAT", 730 "TYPE_SECONDS", 731 "TYPE_MILLISECONDS", 732 "TYPE_MINUTES", 733 "TYPE_HOURS", 734 "TYPE_STANDARD", 735 "TYPE_CURRENCY", 736 "TYPE_FEET", 737 "TYPE_MILES", 738 "TYPE_METERS", 739 "TYPE_KILOMETERS" 740 ], 741 "enumDescriptions": [ 742 "Unspecified type.", 743 "Integer type.", 744 "Floating point type.", 745 "A duration of seconds; a special floating point type.", 746 "A duration in milliseconds; a special floating point type.", 747 "A duration in minutes; a special floating point type.", 748 "A duration in hours; a special floating point type.", 749 "A custom metric of standard type; a special floating point type.", 750 "An amount of money; a special floating point type.", 751 "A length in feet; a special floating point type.", 752 "A length in miles; a special floating point type.", 753 "A length in meters; a special floating point type.", 754 "A length in kilometers; a special floating point type." 755 ], 756 "type": "string" 757 } 758 }, 759 "type": "object" 760 }, 761 "MetricMetadata": { 762 "description": "Explains a metric.", 763 "id": "MetricMetadata", 764 "properties": { 765 "apiName": { 766 "description": "A metric name. Useable in [Metric](#Metric)'s `name`. For example, `eventCount`.", 767 "type": "string" 768 }, 769 "customDefinition": { 770 "description": "True if the metric is a custom metric for this property.", 771 "type": "boolean" 772 }, 773 "deprecatedApiNames": { 774 "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`.", 775 "items": { 776 "type": "string" 777 }, 778 "type": "array" 779 }, 780 "description": { 781 "description": "Description of how this metric is used and calculated.", 782 "type": "string" 783 }, 784 "expression": { 785 "description": "The mathematical expression for this derived metric. Can be used in [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics are not expressions, and for non-expressions, this field is empty.", 786 "type": "string" 787 }, 788 "type": { 789 "description": "The type of this metric.", 790 "enum": [ 791 "METRIC_TYPE_UNSPECIFIED", 792 "TYPE_INTEGER", 793 "TYPE_FLOAT", 794 "TYPE_SECONDS", 795 "TYPE_MILLISECONDS", 796 "TYPE_MINUTES", 797 "TYPE_HOURS", 798 "TYPE_STANDARD", 799 "TYPE_CURRENCY", 800 "TYPE_FEET", 801 "TYPE_MILES", 802 "TYPE_METERS", 803 "TYPE_KILOMETERS" 804 ], 805 "enumDescriptions": [ 806 "Unspecified type.", 807 "Integer type.", 808 "Floating point type.", 809 "A duration of seconds; a special floating point type.", 810 "A duration in milliseconds; a special floating point type.", 811 "A duration in minutes; a special floating point type.", 812 "A duration in hours; a special floating point type.", 813 "A custom metric of standard type; a special floating point type.", 814 "An amount of money; a special floating point type.", 815 "A length in feet; a special floating point type.", 816 "A length in miles; a special floating point type.", 817 "A length in meters; a special floating point type.", 818 "A length in kilometers; a special floating point type." 819 ], 820 "type": "string" 821 }, 822 "uiName": { 823 "description": "This metric's name within the Google Analytics user interface. For example, `Event count`.", 824 "type": "string" 825 } 826 }, 827 "type": "object" 828 }, 829 "MetricOrderBy": { 830 "description": "Sorts by metric values.", 831 "id": "MetricOrderBy", 832 "properties": { 833 "metricName": { 834 "description": "A metric name in the request to order by.", 835 "type": "string" 836 } 837 }, 838 "type": "object" 839 }, 840 "MetricValue": { 841 "description": "The value of a metric.", 842 "id": "MetricValue", 843 "properties": { 844 "value": { 845 "description": "Measurement value. See MetricHeader for type.", 846 "type": "string" 847 } 848 }, 849 "type": "object" 850 }, 851 "NumericFilter": { 852 "description": "Filters for numeric or date values.", 853 "id": "NumericFilter", 854 "properties": { 855 "operation": { 856 "description": "The operation type for this filter.", 857 "enum": [ 858 "OPERATION_UNSPECIFIED", 859 "EQUAL", 860 "LESS_THAN", 861 "LESS_THAN_OR_EQUAL", 862 "GREATER_THAN", 863 "GREATER_THAN_OR_EQUAL" 864 ], 865 "enumDescriptions": [ 866 "Unspecified.", 867 "Equal", 868 "Less than", 869 "Less than or equal", 870 "Greater than", 871 "Greater than or equal" 872 ], 873 "type": "string" 874 }, 875 "value": { 876 "$ref": "NumericValue", 877 "description": "A numeric value or a date value." 878 } 879 }, 880 "type": "object" 881 }, 882 "NumericValue": { 883 "description": "To represent a number.", 884 "id": "NumericValue", 885 "properties": { 886 "doubleValue": { 887 "description": "Double value", 888 "format": "double", 889 "type": "number" 890 }, 891 "int64Value": { 892 "description": "Integer value", 893 "format": "int64", 894 "type": "string" 895 } 896 }, 897 "type": "object" 898 }, 899 "OrderBy": { 900 "description": "The sort options.", 901 "id": "OrderBy", 902 "properties": { 903 "desc": { 904 "description": "If true, sorts by descending order.", 905 "type": "boolean" 906 }, 907 "dimension": { 908 "$ref": "DimensionOrderBy", 909 "description": "Sorts results by a dimension's values." 910 }, 911 "metric": { 912 "$ref": "MetricOrderBy", 913 "description": "Sorts results by a metric's values." 914 }, 915 "pivot": { 916 "$ref": "PivotOrderBy", 917 "description": "Sorts results by a metric's values within a pivot column group." 918 } 919 }, 920 "type": "object" 921 }, 922 "Pivot": { 923 "description": "Describes the visible dimension columns and rows in the report response.", 924 "id": "Pivot", 925 "properties": { 926 "fieldNames": { 927 "description": "Dimension names for visible columns in the report response. Including \"dateRange\" produces a date range column; for each row in the response, dimension values in the date range column will indicate the corresponding date range from the request.", 928 "items": { 929 "type": "string" 930 }, 931 "type": "array" 932 }, 933 "limit": { 934 "description": "The number of rows to return in this pivot. If the `limit` parameter is unspecified, up to 10,000 rows are returned. The product of the `limit` for each `pivot` in a `RunPivotReportRequest` must not exceed 100,000. For example, a two pivot request with `limit: 1000` in each pivot will fail because the product is `1,000,000`.", 935 "format": "int64", 936 "type": "string" 937 }, 938 "metricAggregations": { 939 "description": "Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations.", 940 "items": { 941 "enum": [ 942 "METRIC_AGGREGATION_UNSPECIFIED", 943 "TOTAL", 944 "MINIMUM", 945 "MAXIMUM", 946 "COUNT" 947 ], 948 "enumDescriptions": [ 949 "Unspecified operator.", 950 "SUM operator.", 951 "Minimum operator.", 952 "Maximum operator.", 953 "Count operator." 954 ], 955 "type": "string" 956 }, 957 "type": "array" 958 }, 959 "offset": { 960 "description": "The row count of the start row. The first row is counted as row 0.", 961 "format": "int64", 962 "type": "string" 963 }, 964 "orderBys": { 965 "description": "Specifies how dimensions are ordered in the pivot. In the first Pivot, the OrderBys determine Row and PivotDimensionHeader ordering; in subsequent Pivots, the OrderBys determine only PivotDimensionHeader ordering. Dimensions specified in these OrderBys must be a subset of Pivot.field_names.", 966 "items": { 967 "$ref": "OrderBy" 968 }, 969 "type": "array" 970 } 971 }, 972 "type": "object" 973 }, 974 "PivotDimensionHeader": { 975 "description": "Summarizes dimension values from a row for this pivot.", 976 "id": "PivotDimensionHeader", 977 "properties": { 978 "dimensionValues": { 979 "description": "Values of multiple dimensions in a pivot.", 980 "items": { 981 "$ref": "DimensionValue" 982 }, 983 "type": "array" 984 } 985 }, 986 "type": "object" 987 }, 988 "PivotHeader": { 989 "description": "Dimensions' values in a single pivot.", 990 "id": "PivotHeader", 991 "properties": { 992 "pivotDimensionHeaders": { 993 "description": "The size is the same as the cardinality of the corresponding dimension combinations.", 994 "items": { 995 "$ref": "PivotDimensionHeader" 996 }, 997 "type": "array" 998 }, 999 "rowCount": { 1000 "description": "The cardinality of the pivot. The total number of rows for this pivot's fields regardless of how the parameters `offset` and `limit` are specified in the request.", 1001 "format": "int32", 1002 "type": "integer" 1003 } 1004 }, 1005 "type": "object" 1006 }, 1007 "PivotOrderBy": { 1008 "description": "Sorts by a pivot column group.", 1009 "id": "PivotOrderBy", 1010 "properties": { 1011 "metricName": { 1012 "description": "In the response to order by, order rows by this column. Must be a metric name from the request.", 1013 "type": "string" 1014 }, 1015 "pivotSelections": { 1016 "description": "Used to select a dimension name and value pivot. If multiple pivot selections are given, the sort occurs on rows where all pivot selection dimension name and value pairs match the row's dimension name and value pair.", 1017 "items": { 1018 "$ref": "PivotSelection" 1019 }, 1020 "type": "array" 1021 } 1022 }, 1023 "type": "object" 1024 }, 1025 "PivotSelection": { 1026 "description": "A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric's value. For example if pivots = {{\"browser\", \"Chrome\"}} and metric_name = \"Sessions\", then the rows will be sorted based on Sessions in Chrome. ---------|----------|----------------|----------|---------------- | Chrome | Chrome | Safari | Safari ---------|----------|----------------|----------|---------------- Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions ---------|----------|----------------|----------|---------------- US | 2 | 2 | 3 | 1 ---------|----------|----------------|----------|---------------- Canada | 3 | 1 | 4 | 1 ---------|----------|----------------|----------|----------------", 1027 "id": "PivotSelection", 1028 "properties": { 1029 "dimensionName": { 1030 "description": "Must be a dimension name from the request.", 1031 "type": "string" 1032 }, 1033 "dimensionValue": { 1034 "description": "Order by only when the named dimension is this value.", 1035 "type": "string" 1036 } 1037 }, 1038 "type": "object" 1039 }, 1040 "PropertyQuota": { 1041 "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.", 1042 "id": "PropertyQuota", 1043 "properties": { 1044 "concurrentRequests": { 1045 "$ref": "QuotaStatus", 1046 "description": "Standard Analytics Properties can send up to 10 concurrent requests; Analytics 360 Properties can use up to 50 concurrent requests." 1047 }, 1048 "serverErrorsPerProjectPerHour": { 1049 "$ref": "QuotaStatus", 1050 "description": "Standard Analytics Properties and cloud project pairs can have up to 10 server errors per hour; Analytics 360 Properties and cloud project pairs can have up to 50 server errors per hour." 1051 }, 1052 "tokensPerDay": { 1053 "$ref": "QuotaStatus", 1054 "description": "Standard Analytics Properties can use up to 25,000 tokens per day; Analytics 360 Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens." 1055 }, 1056 "tokensPerHour": { 1057 "$ref": "QuotaStatus", 1058 "description": "Standard Analytics Properties can use up to 5,000 tokens per hour; Analytics 360 Properties can use 50,000 tokens per hour. An API request consumes a single number of tokens, and that number is deducted from both the hourly and daily quotas." 1059 } 1060 }, 1061 "type": "object" 1062 }, 1063 "QuotaStatus": { 1064 "description": "Current state for a particular quota group.", 1065 "id": "QuotaStatus", 1066 "properties": { 1067 "consumed": { 1068 "description": "Quota consumed by this request.", 1069 "format": "int32", 1070 "type": "integer" 1071 }, 1072 "remaining": { 1073 "description": "Quota remaining after this request.", 1074 "format": "int32", 1075 "type": "integer" 1076 } 1077 }, 1078 "type": "object" 1079 }, 1080 "ResponseMetaData": { 1081 "description": "Response's metadata carrying additional information about the report content.", 1082 "id": "ResponseMetaData", 1083 "properties": { 1084 "dataLossFromOtherRow": { 1085 "description": "If true, indicates some buckets of dimension combinations are rolled into \"(other)\" row. This can happen for high cardinality reports.", 1086 "type": "boolean" 1087 } 1088 }, 1089 "type": "object" 1090 }, 1091 "Row": { 1092 "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\" } ] ```", 1093 "id": "Row", 1094 "properties": { 1095 "dimensionValues": { 1096 "description": "List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.", 1097 "items": { 1098 "$ref": "DimensionValue" 1099 }, 1100 "type": "array" 1101 }, 1102 "metricValues": { 1103 "description": "List of requested visible metric values.", 1104 "items": { 1105 "$ref": "MetricValue" 1106 }, 1107 "type": "array" 1108 } 1109 }, 1110 "type": "object" 1111 }, 1112 "RunPivotReportRequest": { 1113 "description": "The request to generate a pivot report.", 1114 "id": "RunPivotReportRequest", 1115 "properties": { 1116 "cohortSpec": { 1117 "$ref": "CohortSpec", 1118 "description": "Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present." 1119 }, 1120 "currencyCode": { 1121 "description": "A currency code in ISO4217 format, such as \"AED\", \"USD\", \"JPY\". If the field is empty, the report uses the entity's default currency.", 1122 "type": "string" 1123 }, 1124 "dateRanges": { 1125 "description": "The date range to retrieve event data for the report. If multiple date ranges are specified, event data from each date range is used in the report. A special dimension with field name \"dateRange\" can be included in a Pivot's field names; if included, the report compares between date ranges. In a cohort request, this `dateRanges` must be unspecified.", 1126 "items": { 1127 "$ref": "DateRange" 1128 }, 1129 "type": "array" 1130 }, 1131 "dimensionFilter": { 1132 "$ref": "FilterExpression", 1133 "description": "The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter." 1134 }, 1135 "dimensions": { 1136 "description": "The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.", 1137 "items": { 1138 "$ref": "Dimension" 1139 }, 1140 "type": "array" 1141 }, 1142 "entity": { 1143 "$ref": "Entity", 1144 "description": "A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity." 1145 }, 1146 "keepEmptyRows": { 1147 "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.", 1148 "type": "boolean" 1149 }, 1150 "metricFilter": { 1151 "$ref": "FilterExpression", 1152 "description": "The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter." 1153 }, 1154 "metrics": { 1155 "description": "The metrics requested, at least one metric needs to be specified. All defined metrics must be used by one of the following: metric_expression, metric_filter, order_bys.", 1156 "items": { 1157 "$ref": "Metric" 1158 }, 1159 "type": "array" 1160 }, 1161 "pivots": { 1162 "description": "Describes the visual format of the report's dimensions in columns or rows. The union of the fieldNames (dimension names) in all pivots must be a subset of dimension names defined in Dimensions. No two pivots can share a dimension. A dimension is only visible if it appears in a pivot.", 1163 "items": { 1164 "$ref": "Pivot" 1165 }, 1166 "type": "array" 1167 }, 1168 "returnPropertyQuota": { 1169 "description": "Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", 1170 "type": "boolean" 1171 } 1172 }, 1173 "type": "object" 1174 }, 1175 "RunPivotReportResponse": { 1176 "description": "The response pivot report table corresponding to a pivot request.", 1177 "id": "RunPivotReportResponse", 1178 "properties": { 1179 "aggregates": { 1180 "description": "Aggregation of metric values. Can be totals, minimums, or maximums. The returned aggregations are controlled by the metric_aggregations in the pivot. The type of aggregation returned in each row is shown by the dimension_values which are set to \"RESERVED_\".", 1181 "items": { 1182 "$ref": "Row" 1183 }, 1184 "type": "array" 1185 }, 1186 "dimensionHeaders": { 1187 "description": "Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.", 1188 "items": { 1189 "$ref": "DimensionHeader" 1190 }, 1191 "type": "array" 1192 }, 1193 "metadata": { 1194 "$ref": "ResponseMetaData", 1195 "description": "Metadata for the report." 1196 }, 1197 "metricHeaders": { 1198 "description": "Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.", 1199 "items": { 1200 "$ref": "MetricHeader" 1201 }, 1202 "type": "array" 1203 }, 1204 "pivotHeaders": { 1205 "description": "Summarizes the columns and rows created by a pivot. Each pivot in the request produces one header in the response. If we have a request like this: \"pivots\": [{ \"fieldNames\": [\"country\", \"city\"] }, { \"fieldNames\": \"eventName\" }] We will have the following `pivotHeaders` in the response: \"pivotHeaders\" : [{ \"dimensionHeaders\": [{ \"dimensionValues\": [ { \"value\": \"United Kingdom\" }, { \"value\": \"London\" } ] }, { \"dimensionValues\": [ { \"value\": \"Japan\" }, { \"value\": \"Osaka\" } ] }] }, { \"dimensionHeaders\": [{ \"dimensionValues\": [{ \"value\": \"session_start\" }] }, { \"dimensionValues\": [{ \"value\": \"scroll\" }] }] }]", 1206 "items": { 1207 "$ref": "PivotHeader" 1208 }, 1209 "type": "array" 1210 }, 1211 "propertyQuota": { 1212 "$ref": "PropertyQuota", 1213 "description": "This Analytics Property's quota state including this request." 1214 }, 1215 "rows": { 1216 "description": "Rows of dimension value combinations and metric values in the report.", 1217 "items": { 1218 "$ref": "Row" 1219 }, 1220 "type": "array" 1221 } 1222 }, 1223 "type": "object" 1224 }, 1225 "RunRealtimeReportRequest": { 1226 "description": "The request to generate a realtime report.", 1227 "id": "RunRealtimeReportRequest", 1228 "properties": { 1229 "dimensionFilter": { 1230 "$ref": "FilterExpression", 1231 "description": "The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter." 1232 }, 1233 "dimensions": { 1234 "description": "The dimensions requested and displayed.", 1235 "items": { 1236 "$ref": "Dimension" 1237 }, 1238 "type": "array" 1239 }, 1240 "limit": { 1241 "description": "The number of rows to return. If the `limit` parameter is unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for.", 1242 "format": "int64", 1243 "type": "string" 1244 }, 1245 "metricAggregations": { 1246 "description": "Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to \"RESERVED_(MetricAggregation)\".", 1247 "items": { 1248 "enum": [ 1249 "METRIC_AGGREGATION_UNSPECIFIED", 1250 "TOTAL", 1251 "MINIMUM", 1252 "MAXIMUM", 1253 "COUNT" 1254 ], 1255 "enumDescriptions": [ 1256 "Unspecified operator.", 1257 "SUM operator.", 1258 "Minimum operator.", 1259 "Maximum operator.", 1260 "Count operator." 1261 ], 1262 "type": "string" 1263 }, 1264 "type": "array" 1265 }, 1266 "metricFilter": { 1267 "$ref": "FilterExpression", 1268 "description": "The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter." 1269 }, 1270 "metrics": { 1271 "description": "The metrics requested and displayed.", 1272 "items": { 1273 "$ref": "Metric" 1274 }, 1275 "type": "array" 1276 }, 1277 "orderBys": { 1278 "description": "Specifies how rows are ordered in the response.", 1279 "items": { 1280 "$ref": "OrderBy" 1281 }, 1282 "type": "array" 1283 }, 1284 "returnPropertyQuota": { 1285 "description": "Toggles whether to return the current state of this Analytics Property's Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).", 1286 "type": "boolean" 1287 } 1288 }, 1289 "type": "object" 1290 }, 1291 "RunRealtimeReportResponse": { 1292 "description": "The response realtime report table corresponding to a request.", 1293 "id": "RunRealtimeReportResponse", 1294 "properties": { 1295 "dimensionHeaders": { 1296 "description": "Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.", 1297 "items": { 1298 "$ref": "DimensionHeader" 1299 }, 1300 "type": "array" 1301 }, 1302 "maximums": { 1303 "description": "If requested, the maximum values of metrics.", 1304 "items": { 1305 "$ref": "Row" 1306 }, 1307 "type": "array" 1308 }, 1309 "metricHeaders": { 1310 "description": "Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.", 1311 "items": { 1312 "$ref": "MetricHeader" 1313 }, 1314 "type": "array" 1315 }, 1316 "minimums": { 1317 "description": "If requested, the minimum values of metrics.", 1318 "items": { 1319 "$ref": "Row" 1320 }, 1321 "type": "array" 1322 }, 1323 "propertyQuota": { 1324 "$ref": "PropertyQuota", 1325 "description": "This Analytics Property's Realtime quota state including this request." 1326 }, 1327 "rowCount": { 1328 "description": "The total number of rows in the query result, regardless of the number of rows returned in the response. For example if a query returns 175 rows and includes limit = 50 in the API request, the response will contain row_count = 175 but only 50 rows.", 1329 "format": "int32", 1330 "type": "integer" 1331 }, 1332 "rows": { 1333 "description": "Rows of dimension value combinations and metric values in the report.", 1334 "items": { 1335 "$ref": "Row" 1336 }, 1337 "type": "array" 1338 }, 1339 "totals": { 1340 "description": "If requested, the totaled values of metrics.", 1341 "items": { 1342 "$ref": "Row" 1343 }, 1344 "type": "array" 1345 } 1346 }, 1347 "type": "object" 1348 }, 1349 "RunReportRequest": { 1350 "description": "The request to generate a report.", 1351 "id": "RunReportRequest", 1352 "properties": { 1353 "cohortSpec": { 1354 "$ref": "CohortSpec", 1355 "description": "Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present." 1356 }, 1357 "currencyCode": { 1358 "description": "A currency code in ISO4217 format, such as \"AED\", \"USD\", \"JPY\". If the field is empty, the report uses the entity's default currency.", 1359 "type": "string" 1360 }, 1361 "dateRanges": { 1362 "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.", 1363 "items": { 1364 "$ref": "DateRange" 1365 }, 1366 "type": "array" 1367 }, 1368 "dimensionFilter": { 1369 "$ref": "FilterExpression", 1370 "description": "The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter." 1371 }, 1372 "dimensions": { 1373 "description": "The dimensions requested and displayed.", 1374 "items": { 1375 "$ref": "Dimension" 1376 }, 1377 "type": "array" 1378 }, 1379 "entity": { 1380 "$ref": "Entity", 1381 "description": "A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity." 1382 }, 1383 "keepEmptyRows": { 1384 "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.", 1385 "type": "boolean" 1386 }, 1387 "limit": { 1388 "description": "The number of rows to return. If the `limit` parameter is unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for.", 1389 "format": "int64", 1390 "type": "string" 1391 }, 1392 "metricAggregations": { 1393 "description": "Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to \"RESERVED_(MetricAggregation)\".", 1394 "items": { 1395 "enum": [ 1396 "METRIC_AGGREGATION_UNSPECIFIED", 1397 "TOTAL", 1398 "MINIMUM", 1399 "MAXIMUM", 1400 "COUNT" 1401 ], 1402 "enumDescriptions": [ 1403 "Unspecified operator.", 1404 "SUM operator.", 1405 "Minimum operator.", 1406 "Maximum operator.", 1407 "Count operator." 1408 ], 1409 "type": "string" 1410 }, 1411 "type": "array" 1412 }, 1413 "metricFilter": { 1414 "$ref": "FilterExpression", 1415 "description": "The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter." 1416 }, 1417 "metrics": { 1418 "description": "The metrics requested and displayed.", 1419 "items": { 1420 "$ref": "Metric" 1421 }, 1422 "type": "array" 1423 }, 1424 "offset": { 1425 "description": "The row count of the start row. The first row is counted as row 0.", 1426 "format": "int64", 1427 "type": "string" 1428 }, 1429 "orderBys": { 1430 "description": "Specifies how rows are ordered in the response.", 1431 "items": { 1432 "$ref": "OrderBy" 1433 }, 1434 "type": "array" 1435 }, 1436 "returnPropertyQuota": { 1437 "description": "Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", 1438 "type": "boolean" 1439 } 1440 }, 1441 "type": "object" 1442 }, 1443 "RunReportResponse": { 1444 "description": "The response report table corresponding to a request.", 1445 "id": "RunReportResponse", 1446 "properties": { 1447 "dimensionHeaders": { 1448 "description": "Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.", 1449 "items": { 1450 "$ref": "DimensionHeader" 1451 }, 1452 "type": "array" 1453 }, 1454 "maximums": { 1455 "description": "If requested, the maximum values of metrics.", 1456 "items": { 1457 "$ref": "Row" 1458 }, 1459 "type": "array" 1460 }, 1461 "metadata": { 1462 "$ref": "ResponseMetaData", 1463 "description": "Metadata for the report." 1464 }, 1465 "metricHeaders": { 1466 "description": "Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.", 1467 "items": { 1468 "$ref": "MetricHeader" 1469 }, 1470 "type": "array" 1471 }, 1472 "minimums": { 1473 "description": "If requested, the minimum values of metrics.", 1474 "items": { 1475 "$ref": "Row" 1476 }, 1477 "type": "array" 1478 }, 1479 "propertyQuota": { 1480 "$ref": "PropertyQuota", 1481 "description": "This Analytics Property's quota state including this request." 1482 }, 1483 "rowCount": { 1484 "description": "The total number of rows in the query result, regardless of the number of rows returned in the response. For example if a query returns 175 rows and includes limit = 50 in the API request, the response will contain row_count = 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", 1485 "format": "int32", 1486 "type": "integer" 1487 }, 1488 "rows": { 1489 "description": "Rows of dimension value combinations and metric values in the report.", 1490 "items": { 1491 "$ref": "Row" 1492 }, 1493 "type": "array" 1494 }, 1495 "totals": { 1496 "description": "If requested, the totaled values of metrics.", 1497 "items": { 1498 "$ref": "Row" 1499 }, 1500 "type": "array" 1501 } 1502 }, 1503 "type": "object" 1504 }, 1505 "StringFilter": { 1506 "description": "The filter for string", 1507 "id": "StringFilter", 1508 "properties": { 1509 "caseSensitive": { 1510 "description": "If true, the string value is case sensitive.", 1511 "type": "boolean" 1512 }, 1513 "matchType": { 1514 "description": "The match type for this filter.", 1515 "enum": [ 1516 "MATCH_TYPE_UNSPECIFIED", 1517 "EXACT", 1518 "BEGINS_WITH", 1519 "ENDS_WITH", 1520 "CONTAINS", 1521 "FULL_REGEXP", 1522 "PARTIAL_REGEXP" 1523 ], 1524 "enumDescriptions": [ 1525 "Unspecified", 1526 "Exact match of the string value.", 1527 "Begins with the string value.", 1528 "Ends with the string value.", 1529 "Contains the string value.", 1530 "Full regular expression match with the string value.", 1531 "Partial regular expression match with the string value." 1532 ], 1533 "type": "string" 1534 }, 1535 "value": { 1536 "description": "The string value used for the matching.", 1537 "type": "string" 1538 } 1539 }, 1540 "type": "object" 1541 } 1542 }, 1543 "servicePath": "", 1544 "title": "Google Analytics Data API", 1545 "version": "v1alpha", 1546 "version_module": true 1547}