Hello,

I am getting the status from the batch job result.  However it seems to blank.  
My implementation was taken directly from the 
AddCompleteCampaignsUsingBatchJob.php example

See snippet below.

// Gets all the results from running batch job and print their information.
        $batchJobResults = 
$this->googleAdsBatchServiceClient->listBatchJobResults(
            $batchJobResourceName,
            ['pageSize' => self::PAGE_SIZE]
        );
        foreach ($batchJobResults->iterateAllElements() as $batchJobResult) {
            /** @var BatchJobResult $batchJobResult */
            printf(
                "\t [%s] Batch job #%d has a status '%s' and response of type 
'%s'.%s",
                date('Y-m-d H:i:s'), $batchJobResult->getOperationIndex(),
                $batchJobResult->getStatus()
                    ? $batchJobResult->getStatus()->getMessage() : 'N/A',
                $batchJobResult->getMutateOperationResponse()
                    ? 
$batchJobResult->getMutateOperationResponse()->getResponse()
                    : 'N/A',
                PHP_EOL
            );
        }




> On Dec 15, 2022, at 9:55 AM, Google Ads API Forum Advisor 
> <adsapi@forumsupport.google> wrote:
> 
> Hi,
> 
> As per this guide 
> <https://developers.google.com/google-ads/api/docs/batch-processing/flow?hl=en#listresults>,
>  and based on the message "Batch job #0 has a status 'N/A' and response of 
> type 'campaign_criterion_result'." you received, you do not appear to be 
> acquiring the contents of the status 
> <https://developers.google.com/google-ads/api/reference/rpc/v12/BatchJobResult#status>
>  field.
> 
> That said, could you also share how you are listing the results and is it 
> similar to this PHP implementation 
> <https://developers.google.com/google-ads/api/docs/batch-processing/flow?hl=en#php_5>?
> 
> Best regards,
> 
>       
> Peter Laurence
> Google Ads API Team
>  
> 
> 
> ref:_00D1U1174p._5004Q2giLdB:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/D6E4ACB2-6C1F-42BC-8744-8C0AA2A8672A%40gmail.com.
  • Ba... roliver
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... roliver
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
          • ... Rodney Oliver

Reply via email to