Hello everyone, With C#, I am try to get AD_PERFORMANCE_REPORT. Here's the code:
ReportDefinition definition = new ReportDefinition(); definition.reportName = "Ad Performance For "; definition.reportType = ReportDefinitionReportType.AD_PERFORMANCE_REPORT; definition.downloadFormat = DownloadFormat.CSV; definition.dateRangeType = ReportDefinitionDateRangeType.CUSTOM_DATE; // Create selector. Selector selector = new Selector(); selector.fields = new string[] { "AccountDescriptiveName", "AccountCurrencyCode", "CampaignName", "Id", "Clicks", "Impressions", "Cost", "Url", "AdGroupId", "AdGroupName", "CreativeFinalUrls", "DisplayUrl", "AveragePosition"}; DateRange dateRange = new DateRange(); dateRange.min = dateTime.AddDays(-1).ToString("yyyyMMdd"); dateRange.max = dateTime.ToString("yyyyMMdd"); selector.dateRange = dateRange; Predicate predicate = new Predicate(); predicate.field = "Status"; predicate.@operator = PredicateOperator.EQUALS; predicate.values = new string[] { "ENABLED" }; if (ASINList != null) { Predicate ASINpredicate = new Predicate(); ASINpredicate.field = "CreativeFinalUrls"; ASINpredicate.@operator = PredicateOperator.CONTAINS_ANY; string[] asinValues = new string[ASINList.Count]; int index = 0; foreach (string asin in ASINList) { asinValues[index] = asin; index++; } ASINpredicate.values = asinValues; selector.predicates = new Predicate[] { predicate , ASINpredicate }; }else { selector.predicates = new Predicate[] { predicate }; } definition.selector = selector; definition.includeZeroImpressions = true; byte[] content = null; ReportUtilities utilities = new ReportUtilities(user, "v201409", definition); content = utilities.GetResponse().Download(); And the result is an exception with the message "Internal Server Error." Anybody help? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/18b76d98-613f-44f8-82b6-e208d1a70165%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.