Change from v3.3 to v3.4 - Patch failures

28 views
Skip to first unread message

maranz hiberus

unread,
Sep 17, 2020, 6:47:56 AM9/17/20
to Google's DoubleClick Campaign Manager API Forum

Hi team,

We are migrating from version 3.3 to 3.4 using java API library and we have seen that the patch request has changed (in this example, for landing pages):

//v3.3
patchedLandingPage = reporting.advertiserLandingPages().patch(userProfileId, id, landingPage).execute();

//v3.4
patchedLandingPage = reporting.advertiserLandingPages().patch(userProfileId, landingPage).execute();

This is the definition:

Patch com.google.api.services.dfareporting.Dfareporting.AdvertiserLandingPages.patch(Long profileId, LandingPage content) throws IOException

so now it does not allow to specify the ID of the object. We have informed the id in the patched object itself (we just want to change the name of the landing page, in this case):

myLandingPage = new LandingPage();
myLandingPage.setName("DEFAULT_LP_CAMPAIGN ID_24632863"); //set new name
myLandingPage.setId(27708076); //inform original landing page id

That generates the following object:

GenericData{classInfo=[advertiserId, archived, deepLinks, id, kind, name, url], {id=27708076, name=DEFAULT_LP_CAMPAIGN ID_24632863}}

but we still are getting an error informing us that no ID has been provided:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
{
  "code" : 404,
  "errors" : [ {
    "domain" : "global",
    "message" : "18101 : Landing page with ID 0 can't be found.",
    "reason" : "notFound"
  } ],
  "message" : "18101 : Landing page with ID 0 can't be found."
}

I have reviewed the patching method in the documentation and I havent't found any information; more even, it states that it requires the id:


I took a look at the example project


But unfortunately I don't see any patch operations example.

The library I am using is the one informed in the project page (v3.4-rev20200825-1.30.10):


As there are other patch operations (ad, account, subaccount) that seem to have changed too, I would like to know how they should be managed with java (and preferably, a full example, pretty please!). I fail to understand it right now. Sorry if I am asking something obvious I am overlooking.

Finally, I would like to know if there is a changelog with breaking changes like this one (a change in the method's signature), for planning future migrations.

Regards,

Miguel Angel

DCM API (DoubleClick Campaign Mgr)

unread,
Sep 17, 2020, 11:59:28 AM9/17/20
to maranz....@gmail.com, google-doubleclick-...@googlegroups.com
Hi Miguel,

Please send me the API request (including HTTP request and the body of the request) and response in JSON format using 'Reply privately to author' option.

Thanks,

Google Logo
Lakshmi Prathipati
DCM API Team
 


ref:_00D1U1174p._5004Q24c5jZ:ref
Reply all
Reply to author
Forward
0 new messages