I was trying to create the reach report using Create Query call - https://developers.google.com/bid-manager/v1.1/queries/createquery using SDK, getting below error response from API.
Exception thrown: 'Google.GoogleApiException' in System.Private.CoreLib.dll: 'Google.Apis.Requests.RequestError
The request you submitted is invalid. [400]
Errors [
Message[The request you submitted is invalid.] Location[ - ] Reason[validationError] Domain[global]
]'
When I checked DV360 UI I'm able to see the newly created Reach Report but it did not contain any Metrics provided -
Metrics = new[]
{
"METRIC_UNIQUE_REACH_IMPRESSION_REACH",
"METRIC_UNIQUE_REACH_CLICK_REACH",
"METRIC_UNIQUE_REACH_TOTAL_REACH",
"METRIC_UNIQUE_REACH_AVERAGE_IMPRESSION_FREQUENCY"
},

I also try to pull the Reach report created on DV360 Platform to check the correct metric name, getting metrics name as "METRIC_UNKNOWN" for all Reach metrics selected in Report -
"metrics": [
"METRIC_UNKNOWN",
"METRIC_UNKNOWN",
"METRIC_UNKNOWN",
"METRIC_UNKNOWN"
],
Complete Response
{
"kind": "doubleclickbidmanager#query",
"metadata": {
"dataRange": "MONTH_TO_DATE",
"format": "CSV",
"googleCloudStoragePathForLatestReport": "URL", // Changed
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": 1600245611669,
"locale": null,
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": null,
"title": "Reach Report",
"ETag": null
},
"params": {
"filters": [
{
"type": "FILTER_ADVERTISER",
"value": "",
"ETag": null
}
],
"groupBys": [
"FILTER_PARTNER",
"FILTER_COUNTRY",
"FILTER_ADVERTISER",
"FILTER_INSERTION_ORDER",
"FILTER_LINE_ITEM"
],
"includeInviteData": true,
"metrics": [
"METRIC_UNKNOWN",
"METRIC_UNKNOWN",
"METRIC_UNKNOWN",
"METRIC_UNKNOWN"
],
"type": "TYPE_REACH_AND_FREQUENCY",
"ETag": null
},
"queryId": 00000000, // Changed
"reportDataEndTimeMs": null,
"reportDataStartTimeMs": null,
"schedule": {
"endTimeMs": 0,
"frequency": "ONE_TIME",
"nextRunMinuteOfDay": null,
"nextRunTimezoneCode": null,
"ETag": null
},
"timezoneCode": null,
"ETag": "\"ZelHb3Dp5JnMm78yZe-j6LnxBf82VZ-LV3xEnzr3lKI/mBvRfmYNCusbE4gfmmRMz5Gwkkg\""
}
Referring this doc for metric naming - https://developers.google.com/bid-manager/v1.1/filters-metrics#metrics
Using the below Query object for creating new Reach report -
return new Query
{
Kind = "doubleclickbidmanager#query",
Metadata = new QueryMetadata
{
Title = "AG - DBM Reach API",
DataRange = "LAST_7_DAYS",
Format = "CSV",
SendNotification = false
},
Params__ = new Parameters
{
Type = "TYPE_REACH_AND_FREQUENCY",
GroupBys = new[]
{
"FILTER_PARTNER",
"FILTER_COUNTRY",
"FILTER_ADVERTISER",
"FILTER_INSERTION_ORDER",
"FILTER_LINE_ITEM"
},
Filters = new List<FilterPair>
{
new FilterPair
{
Type = "FILTER_ADVERTISER",
Value = ""
}
},
Metrics = new[]
{
"METRIC_UNIQUE_REACH_IMPRESSION_REACH",
"METRIC_UNIQUE_REACH_CLICK_REACH",
"METRIC_UNIQUE_REACH_TOTAL_REACH",
"METRIC_UNIQUE_REACH_AVERAGE_IMPRESSION_FREQUENCY"
},
IncludeInviteData = true
},
Schedule = new QuerySchedule
{
Frequency = "ONE_TIME",
EndTimeMs = 0
}
};
I was trying to create the reach report using Create Query call - https://developers.google.com/bid-manager/v1.1/queries/createquery using SDK, getting below error response from API.
When I checked DV360 UI I'm able to see the newly created Reach Report but it did not contain any Metrics provided -
I also try to pull the Reach report created on DV360 Platform to check the correct metric name, getting metrics name as "METRIC_UNKNOWN" for all Reach metrics selected in Report -
Complete Response
{ "kind": "doubleclickbidmanager#query", "metadata": { "dataRange": "MONTH_TO_DATE", "format": "CSV", "googleCloudStoragePathForLatestReport": "URL", // Changed "googleDrivePathForLatestReport": "", "latestReportRunTimeMs": 1600245611669, "locale": null, "reportCount": 0, "running": false, "sendNotification": false, "shareEmailAddress": null, "title": "Reach Report", "ETag": null }, "params": { "filters": [ { "type": "FILTER_ADVERTISER", "value": "", "ETag": null } ], "groupBys": [ "FILTER_PARTNER", "FILTER_COUNTRY", "FILTER_ADVERTISER", "FILTER_INSERTION_ORDER", "FILTER_LINE_ITEM" ], "includeInviteData": true, "metrics": [ "METRIC_UNKNOWN", "METRIC_UNKNOWN", "METRIC_UNKNOWN", "METRIC_UNKNOWN" ], "type": "TYPE_REACH_AND_FREQUENCY", "ETag": null }, "queryId": 00000000, // Changed "reportDataEndTimeMs": null, "reportDataStartTimeMs": null, "schedule": { "endTimeMs": 0, "frequency": "ONE_TIME", "nextRunMinuteOfDay": null, "nextRunTimezoneCode": null, "ETag": null }, "timezoneCode": null, "ETag": "\"ZelHb3Dp5JnMm78yZe-j6LnxBf82VZ-LV3xEnzr3lKI/mBvRfmYNCusbE4gfmmRMz5Gwkkg\"" }Referring this doc for metric naming - https://developers.google.com/bid-manager/v1.1/filters-metrics#metrics
Using the below
Queryobject for creating new Reach report -