Missing data from CampaignCriterionService.get (C#, v201601)

99 views
Skip to first unread message

A. Treble

unread,
Feb 8, 2016, 8:44:27 AM2/8/16
to AdWords API Forum
I'm querying a campaign using the CampaignCriterionService class

Querying the campaign's excluded IP list, I do get the enteries back from the API, however, they do not contain the actual IP address in the returned value

Here is a sample returned value from the API (after being converted to JSON by Json.Net Serialization): I bolded the value in question. I get everything I need about the Criterion except the actual data (the ip address).

{ 
   "campaignId":347371961,
   "campaignIdSpecified":true,
   "isNegative":true,
   "isNegativeSpecified":true,
   "criterion":{
                "ipAddress":null,
                "id":23078300211,
                "idSpecified":true,
                "type":9,
                "typeSpecified":true,
                "CriterionType":"IpBlock"
    },
    "bidModifierSpecified":false,
    "forwardCompatibilityMap":null,
    "CampaignCriterionType":"NegativeCampaignCriterion"
}


Any help would be appreciated.



Yin Niu

unread,
Feb 8, 2016, 2:43:00 PM2/8/16
to AdWords API Forum
Hello, 

Could you please send SOAP request and response logs so that we can analyze further? 

Thanks,
Yin, AdWords API Team. 
Message has been deleted

A. Treble

unread,
Feb 9, 2016, 1:43:32 AM2/9/16
to AdWords API Forum
As requested, here are the request/response logs:

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

Request
-------

POST /api/adwords/cm/v201601/CampaignCriterionService
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.34209)
Authorization: ******
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 1164
Accept-Encoding: gzip
Connection: Keep-Alive
TimeStamp: Tue, 09 Feb 2016 08:42:55 GMT


<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201601"><developerToken xmlns="https://adwords.google.com/api/adwords/cm/v201601">******</developerToken><clientCustomerId xmlns="https://adwords.google.com/api/adwords/cm/v201601">1385642165</clientCustomerId><userAgent xmlns="https://adwords.google.com/api/adwords/cm/v201601">INSERT_YOUR_COMPANY_OR_APPLICATION_NAME_HERE (AwApi-DotNet/18.22.0, Common-Dotnet/3.12.0, .NET CLR/4.0.30319.34209, , gzip)</userAgent></RequestHeader></soap:Header><soap:Body><get xmlns="https://adwords.google.com/api/adwords/cm/v201601"><serviceSelector><fields>CampaignId</fields><fields>Id</fields><fields>CriteriaType</fields><predicates><field>CampaignId</field><operator>EQUALS</operator><values>347371961</values></predicates><predicates><field>IsNegative</field><operator>EQUALS</operator><values>true</values></predicates></serviceSelector></get></soap:Body></soap:Envelope>

Response
--------

Content-Encoding: 
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 473
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=UTF-8
Date: Tue, 09 Feb 2016 06:42:39 GMT
Expires: Tue, 09 Feb 2016 06:42:39 GMT
Server: GSE
TimeStamp: Tue, 09 Feb 2016 08:42:55 GMT


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201601"><requestId>00052b509fa23c880ac4da02d9000217</requestId><serviceName>CampaignCriterionService</serviceName><methodName>get</methodName><operations>1</operations><responseTime>227</responseTime></ResponseHeader></soap:Header><soap:Body><getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201601"><rval><totalNumEntries>2</totalNumEntries><Page.Type>CampaignCriterionPage</Page.Type><entries xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="NegativeCampaignCriterion"><campaignId>347371961</campaignId><isNegative>true</isNegative><criterion xsi:type="IpBlock"><id>23078300211</id><type>IP_BLOCK</type><Criterion.Type>IpBlock</Criterion.Type></criterion><CampaignCriterion.Type>NegativeCampaignCriterion</CampaignCriterion.Type></entries><entries xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="NegativeCampaignCriterion"><campaignId>347371961</campaignId><isNegative>true</isNegative><criterion xsi:type="IpBlock"><id>42157191244</id><type>IP_BLOCK</type><Criterion.Type>IpBlock</Criterion.Type></criterion><CampaignCriterion.Type>NegativeCampaignCriterion</CampaignCriterion.Type></entries></rval></getResponse></soap:Body></soap:Envelope>
-----------------END API CALL-----------------------

Michael Cloonan (AdWords API Team)

unread,
Feb 9, 2016, 10:19:05 AM2/9/16
to AdWords API Forum
Hello,

The IpAddress field isn't selectable, so there is no way to get data for it back from the API. I'm not sure why it's not selectable, however, so I'm going to contact our engineering team to see if we can possibly make this field selectable in a future version of the API. For now, unfortunately, it looks like you can't get this data via the API.

Regards,
Mike, AdWords API Team

Michael Cloonan (AdWords API Team)

unread,
Mar 7, 2016, 10:26:30 AM3/7/16
to AdWords API Forum
Hello,

Good news! This field should now be selectable, even in existing versions. Please give it a try.

Regards,
Mike, AdWords API Team
Reply all
Reply to author
Forward
0 new messages