googleads / googleads-dotnet-lib

Google Ad Manager SOAP API .NET client library
Apache License 2.0
108 stars 199 forks source link

AWQL DefaultLimit and Limit start index issue #211

Closed ber2go closed 8 months ago

ber2go commented 5 years ago

Hi,

Using the queries below. The request on the logs is not setting the start index correctly. var query = new SelectQueryBuilder() .Select(fields) .Where(Campaign.Fields.Id) .In(campaignById.Select(k => k.Key).ToArray()) .DefaultLimit() .Build();

var query = new SelectQueryBuilder() .Select(fields) .Where(Campaign.Fields.Id) .In(campaignById.Select(k => k.Key).ToArray()) .Limit(0,500) .Build();

 -----------------BEGIN API CALL---------------------

Request
-------

POST /api/adwords/cm/v201809/CampaignService
Authorization: REDACTED
Accept-Encoding: gzip, deflate
TimeStamp: Mon, 15 Apr 2019 11:25:53 GMT

<?xml version="1.0" encoding="utf-16"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809">
      <clientCustomerId>127-804-9550</clientCustomerId>
      <developerToken>REDACTED</developerToken>
      <userAgent>SemPullData (AwApi-DotNet/24.5.0, Common-Dotnet/9.5.0, .NET CLR/4.0.30319.42000, Logging, OAuthServiceAccountFlow, SelectorBuilder, gzip)</userAgent>
    </RequestHeader>
  </s:Header>
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <query xmlns="https://adwords.google.com/api/adwords/cm/v201809">
      <query>SELECT Id, CampaignGroupId, Name, Status, ServingStatus, StartDate, EndDate, AdServingOptimizationStatus, Settings, AdvertisingChannelType, AdvertisingChannelSubType, Labels, CampaignTrialType, BaseCampaignId, TrackingUrlTemplate, FinalUrlSuffix, UrlCustomParameters, SelectiveOptimization, BudgetId, BudgetName, Amount, DeliveryMethod, BudgetReferenceCount, IsBudgetExplicitlyShared, BudgetStatus WHERE Id IN [0, 1770295865, 1770296633, 1770623746, 1770625591] LIMIT 500, 500</query>
    </query>
  </s:Body>
</s:Envelope>

Response
--------

Content-Encoding: 
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Alt-Svc: quic=":443"; ma=2592000; v="46,44,43,39"
Transfer-Encoding: chunked
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=UTF-8
Date: Mon, 15 Apr 2019 15:25:51 GMT
Expires: Mon, 15 Apr 2019 15:25:51 GMT
Server: GSE
TimeStamp: Mon, 15 Apr 2019 11:25:53 GMT

<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809">
      <requestId>000586934468900702ab434108017531</requestId>
      <serviceName>CampaignService</serviceName>
      <methodName>query</methodName>
      <operations>1</operations>
      <responseTime>1982</responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <queryResponse xmlns="https://adwords.google.com/api/adwords/cm/v201809">
      <rval>
        <totalNumEntries>2</totalNumEntries>
        <Page.Type>CampaignPage</Page.Type>
      </rval>
    </queryResponse>
  </soap:Body>
</soap:Envelope>
-----------------END API CALL-----------------------
christopherseeley commented 8 months ago

AdWords API has been turned down and replaced by the Google Ads API. Closing as stale.