How do I use BudgetUtilizationReport.cs in the Adwords Example project

29 views
Skip to first unread message

Abdurrahman Al Faruqi

unread,
Jun 10, 2016, 12:21:04 AM6/10/16
to AdWords API Forum
Hi,

Im currently working with campaign performance report. how do i use this code?
I've been declared the startdate, enddate even output path, but i only get this message in SOAP log files :

AdsClientLibs.SoapXmlLogs Information: 1 : 
-----------------BEGIN API CALL---------------------

Request
-------

POST /o/oauth2/token
User-Agent: MyApps (AwApi-DotNet/18.26.0, Common-Dotnet/3.14.0, .NET CLR/4.0.30319.42000, OAuthApplicationFlow, ReportDownloader, gzip)
Content-Type: application/x-www-form-urlencoded
TimeStamp: Fri, 10 Jun 2016 11:16:52 GMT


client_id=115987042427-eg7bdqib431p7r1uo3cgloirdvvn3k2u.apps.googleusercontent.com&client_secret=******&refresh_token=******&grant_type=refresh_token

Response
--------

X-Content-Type-Options: nosniff
Pragma: no-cache
Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
Content-Encoding: 
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Alternate-Protocol: 443:quic
Alt-Svc: quic=":443"; ma=2592000; v="34,33,32,31,30,29,28,27,26,25"
Transfer-Encoding: chunked
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: application/json; charset=utf-8
Date: Fri, 10 Jun 2016 04:16:54 GMT
Expires: Mon, 01 Jan 1990 00:00:00 GMT
P3P: CP="This is not a P3P policy! See https://support.google.com/accounts/answer/151657?hl=en for more info."
Set-Cookie: NID=79=WBxtYC5O6gND_P42mqeBslvukZasZgo-mt25xYM5NHX1Pdho_cdBBt8u2nHnE2Z-2u46lp6y_MnXcxhDPALUxAM9itzimM3YZUVWE1L7FHP4EnKU3jG5BlDQsrgYTUn5;Domain=.google.com;Path=/;Expires=Sat, 10-Dec-2016 04:16:54 GMT;HttpOnly
Server: GSE
TimeStamp: Fri, 10 Jun 2016 11:16:52 GMT


{"access_token":"******","token_type":"Bearer","expires_in":"3600"}
-----------------END API CALL-----------------------

AdsClientLibs.SoapXmlLogs Error: 1 : 
-----------------BEGIN API CALL---------------------

Request
-------

POST /api/adwords/reportdownload/v201603
User-Agent: MyApps (AwApi-DotNet/18.26.0, Common-Dotnet/3.14.0, .NET CLR/4.0.30319.42000, ReportDownloader, gzip)
clientCustomerId: 723-401-2969
Content-Type: application/x-www-form-urlencoded
Authorization: ******
developerToken: ******
apiMode: true
skipReportHeader: true
skipReportSummary: true
skipColumnHeader: false
TimeStamp: Fri, 10 Jun 2016 11:16:52 GMT


__rdquery=Select+CampaignId%2c+CampaignName%2c+Clicks%2c+Impressions%2c+Cost%2c+SearchBudgetLostImpressionShare%2c+ContentBudgetLostImpressionShare%2c+SearchImpressionShare%2c+ContentImpressionShare%2c+TotalBudget%2c+AdNetworkType1%2c+AverageCpc+from+CAMPAIGN_PERFORMANCE_REPORT+DURING+20160601%2c+20160610&developerToken=******&Authorization=******

Response
--------

Content-Encoding: 
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked
Cache-Control: private, max-age=0
Content-Type: text/xml
Date: Fri, 10 Jun 2016 04:16:55 GMT
Expires: Fri, 10 Jun 2016 04:16:55 GMT
Server: GSE
TimeStamp: Fri, 10 Jun 2016 11:16:54 GMT


<?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportDownloadError><ApiError><type>ReportDefinitionError.INVALID_FIELD_NAME_FOR_REPORT</type><trigger></trigger><fieldPath>TotalBudget</fieldPath></ApiError></reportDownloadError>
-----------------END API CALL-----------------------

what happened and how do i solve this?

Thanks.


Peter Oliquino

unread,
Jun 10, 2016, 2:21:50 AM6/10/16
to AdWords API Forum
Hi,

I could see that you added the TotalBudget field in your select query for Campaign Performance Report. Unfortunately, that field is not supported for that report. Just remove it from your query and the report should already work. You may also refer to this link for the list of supported fields.

Thanks,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages