Page Summary
-
This method is used to retrieve the content of a report task after it has been created and is in an 'ACTIVE' state.
-
The request requires a specific path parameter to identify the property and report task.
-
The request body allows for optional parameters like
offsetandlimitto handle pagination of the report data. -
The response body contains the tabular data of the report, including dimension headers, metric headers, and rows of values.
-
Additional metadata in the response provides information about the report, such as data loss from other rows, sampling, and schema restrictions.
Retrieves a report task's content. After requesting the reportTasks.create, you are able to retrieve the report content once the report is ACTIVE. This method will return an error if the report task's state is not ACTIVE. A query response will return the tabular row & column values of the report.
HTTP request
POST https://analyticsdata.googleapis.com/v1alpha/{name=properties/*/reportTasks/*}:query
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name |
Required. The report source name. Format: |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "offset": string, "limit": string } |
| Fields | |
|---|---|
offset |
Optional. The row count of the start row in the report. 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 To learn more about this pagination parameter, see Pagination. |
limit |
Optional. The number of rows to return from the report. 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. The API can also return fewer rows than the requested To learn more about this pagination parameter, see Pagination. |
Response body
The report content corresponding to a report task.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "dimensionHeaders": [ { object ( |
| Fields | |
|---|---|
dimensionHeaders[] |
Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows. |
metricHeaders[] |
Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows. |
rows[] |
Rows of dimension value combinations and metric values in the report. |
totals[] |
If requested, the totaled values of metrics. |
maximums[] |
If requested, the maximum values of metrics. |
minimums[] |
If requested, the minimum values of metrics. |
rowCount |
The total number of rows in the query result. |
metadata |
Metadata for the report. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/analytics.readonlyhttps://www.googleapis.com/auth/analytics