- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- ReportDataQueryRequest
- SortBy
- ColumnHeader
- ColumnType
- ReportDataRow
- Try it!
Executes an ad-hoc query and returns structured JSON payload data.
HTTP request
POST https://dfareporting.googleapis.com/dfareporting/v5/userprofiles/{profileId}/reportdata/query
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
profileId |
Required. The Campaign Manager 360 user profile ID. |
Request body
The request body contains an instance of ReportDataQueryRequest.
Response body
Represents a response to report data request.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "columnHeaders": [ { object ( |
| Fields | |
|---|---|
columnHeaders[] |
Output only. Ordered descriptors of the requested column fields. |
rows[] |
Output only. The resulting set of matching data rows. |
totalRow |
Output only. Singular aggregate total row for the entire query matching the criteria. Column headers apply in the exact same order as data rows. In the totalRow: - All dimension columns contain an empty string (""), as aggregation does not apply. - Non-summable metric columns (e.g. Reach metrics) contain an empty string (""), as grand total aggregation cannot be mathematically/logically computed for them. |
nextPageToken |
Output only. Token to retrieve the next page of rows, or empty if end of results. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/dfareporting
ReportDataQueryRequest
The request body containing ad-hoc query parameters.
| JSON representation |
|---|
{ "dateRange": { object ( |
| Fields | |
|---|---|
dateRange |
Optional. The requested date range covering the report duration. |
dimensionFilters[] |
Optional. The list of dimension values on which report lines are filtered. Utilizes the existing legacy filter message |
dimensionNames[] |
Optional. The list of dimension names to group by. |
metricNames[] |
Required. The list of metric names to include. |
sortBys[] |
Optional. Sort options across either requested dimensions or metrics. |
maxResults |
Optional. Maximum number of result rows to return per page. The default value is 100. The maximum allowed value is 1000. Values above 1000 will be coerced (clamped) down to 1000. Negative values will be rejected. |
pageToken |
Optional. Continuation token for paginating results. |
SortBy
Specifies the sort configuration for a specific field in the report.
| JSON representation |
|---|
{
"name": string,
"sortOrder": enum ( |
| Fields | |
|---|---|
name |
Required. The dimension or metric field name to sort on. |
sortOrder |
Optional. The sort order of this column. |
ColumnHeader
A column header in the report.
| JSON representation |
|---|
{
"name": string,
"type": enum ( |
| Fields | |
|---|---|
name |
Output only. The column name. |
type |
Output only. The column type. |
ColumnType
Enum for column type.
| Enums | |
|---|---|
COLUMN_TYPE_UNSPECIFIED |
Default value. This value is unused. |
DIMENSION |
Dimension. |
METRIC |
Metric. |
ReportDataRow
A row of report data.
| JSON representation |
|---|
{ "values": [ string ] } |
| Fields | |
|---|---|
values[] |
Output only. A single sequential list of all cell values matching columnHeaders indices exactly.
|