私は 201306 を使用していますが、金曜日までは問題なくレポートをダウンロードできました。しかし、今日突然、次のエラーが発生し始めました。
Invalid ReportDefinition Xml: cvc-complex-type.2.4.a: Invalid content was found starting with element 'operator'
私のコードスニペット:
selector.fields = new[]
{
PerformanceSelector.Date,
PerformanceSelector.KeywordId,
PerformanceSelector.KeywordText,
PerformanceSelector.AccountName,
PerformanceSelector.CampaignId,
PerformanceSelector.CampaignName,
PerformanceSelector.AdGroupId,
PerformanceSelector.AdGroupName,
PerformanceSelector.KeywordMatchType,
PerformanceSelector.Impressions,
PerformanceSelector.Clicks,
PerformanceSelector.AveragePosition,
PerformanceSelector.Cost,
PerformanceSelector.AverageCpc,
PerformanceSelector.ClickThroughRate,
PerformanceSelector.Conversions,
PerformanceSelector.ConversionRate,
PerformanceSelector.CostPerConversion,
};
dates = new DateRange { min = String.Format("{0:yyyyMMdd}", StartDate), max = String.Format("{0:yyyyMMdd}", EndDate) };
selector.dateRange = dates;
レポート定義
var reportDefinition = new ReportDefinition
{
reportName = ReportName,
reportType = ReportType,
dateRangeType = ReportDefinitionDateRangeType.CUSTOM_DATE,
includeZeroImpressions = true,
downloadFormat = DownloadFormat.XML,
selector = selector
};
そして、私が得ているエラーは
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportDownloadError><ApiError><type>ReportDownloadError.INVALID_REPORT_DEFINITION_XML</type><trigger>Invalid ReportDefinition Xml: cvc-complex-type.2.4.a: Invalid content was found starting with element 'operator'. One of '{"https://adwords.google.com/api/adwords/cm/v201306":field}' is expected.</trigger><fieldPath></fieldPath></ApiError></reportDownloadError>