Batch Job Service Mutate Response

78 views
Skip to first unread message

Skander Mansouri

unread,
Dec 9, 2021, 11:46:13 AM12/9/21
to AdWords API and Google Ads API Forum
Hi, 

I'm using the Batch Job Service in order to create multiple Campaigns after creating the campaign budget and the bidding strategies.

The batch job runs fine and the campaigns are created in the platform. 

The issue I'm having is that I need the Ids of the campaigns created from the response of the ListBatchJobResult. I have set the ResponseContentType to Mutable in the request but the response I'm getting is a campaign with a resource_name with a negative Id in the CampaignResult().getCampaign().getResourceName()

Here's the portion of the code for the request: 

BatchJobServiceClient.ListBatchJobResultsPagedResponse batchJobResults = batchClient.listBatchJobResults( ListBatchJobResultsRequest.newBuilder() .setResponseContentType(MUTABLE_RESOURCE) .setResourceName(batchJobResourceName) .setPageSize(PAGE_SIZE) .build()); return batchJobResults.getPage() .getResponse() .getResultsList() .stream() .map(BatchJobResult::getMutateOperationResponse) .collect(toList());


Thank you,
Skander

Google Ads API Forum Advisor

unread,
Dec 10, 2021, 3:41:11 AM12/10/21
to ska...@armis.tech, adwor...@googlegroups.com
Hi Skander,

For us to assist you further, please provide the complete request and response logs with request ID so I can have a closer look at the issue. You can send these to me via Reply privately to author option. If this option is not available, please send it directly to googleadsapi-support@google.com.

Regards,
Google Logo
Teejay Wennie Pimentel
Google Ads API Team
 


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