Re: Reporting API usage

2021-05-04 Thread Peter Petrov
Thank you. I got it working. 

I am able to pull the report now. 





On Friday, April 30, 2021 at 3:07:24 PM UTC-4 adsapiforumadvisor wrote:

> Hi Peter,
>
> Thank you for reaching out. Please find my response to your questions 
> below:
>  
>
>1. You are right. You will get the JSON as the returned value. It does 
>not provide the XML or CSV format. You would need to convert them yourself 
>if needed. 
>
>   
>
>1. There aren’t other headers needed to make the API call. 
>
>   
>
>1. These are not there anymore. The clientCustomerId is already 
>specified in the request URL. 
>
>   
>
>1. You might not send the request with complete data required. Please 
>make sure that the request headers and body are correctly configured and 
>constructed with necessary data. If the issue persists, please share the 
>complete request and response logs along with the full cURL code snippet 
>for us via the *Reply privately to author* option to further 
>investigate. 
>
>   
>
>1. application/json is specified format for the request which the 
>server could accept. It is supported by the Google Ads API. 
>
>   
>
> Thanks and regards,
> Xiaoming, Google Ads API Team
>
>  
> [image: Google Logo] 
> Xiaoming 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2GIcDn: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 
"AdWords API and Google Ads 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/342ac132-f46b-44f7-9197-a69571f45325n%40googlegroups.com.


Re: Reporting API usage

2021-04-30 Thread Google Ads API Forum Advisor Prod
Hi Peter,

Thank you for reaching out. Please find my response to your questions below:

You are right. You will get the JSON as the returned value. It does not provide 
the XML or CSV format. You would need to convert them yourself if needed.

There aren’t other headers needed to make the API call.

These are not there anymore. The clientCustomerId is already specified in the 
request URL.

You might not send the request with complete data required. Please make sure 
that the request headers and body are correctly configured and constructed with 
necessary data. If the issue persists, please share the complete request and 
response logs along with the full cURL code snippet for us via the Reply 
privately to author option to further investigate.

application/json is specified format for the request which the server could 
accept. It is supported by the Google Ads API.

Thanks and regards,
Xiaoming, Google Ads API Team


Xiaoming
Google Ads API Team
ref:_00D1U1174p._5004Q2GIcDn: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 
"AdWords API and Google Ads 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/H7cRd0QSE53Y00wq9SAy_-R0Wk6SfV2jIicw%40sfdc.net.


Re: Reporting API usage

2021-04-30 Thread Peter Petrov
5) Also the Linux manual of curl says that when we specify *--data* 
the content type that curl will send to the server will be 
*x-www-form- urlencoded*
But your example explicitly specifies *application/json*
I don't quite get this. 

Again... many thanks in advance. 




On Friday, April 30, 2021 at 5:58:44 AM UTC-4 Peter Petrov wrote:

> OK, thank you. 
>
> So this guide is about the REST API.
>
> 1) So I guess this means I will probably get the results back in JSON 
> format, right?  
> No option to get back XML or CSV (as in the old API), right? 
>
> In the old API the format was being controlled by a field passed in with 
> the report definition. 
> CSV
> XML
> And that report definition was part of the body sent with the POST 
> request. 
>
>
> 2) Are the 4 headers given in the example the only headers one could pass 
> in? 
>
> --header "Content-Type: application/json"  
> --header "developer-token: ${DEVELOPER_TOKEN}"  
> --header "login-customer-id: ${MANAGER_CUSTOMER_ID}"  
> --header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}"  
>
> Are these any additional headers one could pass in? 
>
>
> 3) I am asking the previous question because the old API had headers like  
>
>  skipReportHeader 
>  skipReportSummary 
>  clientCustomerId 
>
> These are not there anymore, correct? 
>
>
> 4) Btw, I have troubles to call this HTTPs endpoint/URL 
>
>
> https://googleads.googleapis.com/v${API_VERSION}/customers/${CUSTOMER_ID}/googleAds:searchStream
>  
>
> but I will keep investigating. The error is not very informative - just 
> HTTP code 400. 
> I am passing in the 4 headers mentioned above so I am not sure what I am 
> doing wrong. 
> Any ideas? 
>
>
>
>
>
>
>
>
> On Thursday, April 29, 2021 at 3:24:53 PM UTC-4 adsapiforumadvisor wrote:
>
>> Hi Peter,
>>
>> Thank you for reaching out. Using the client library is not required. You 
>> could make API calls by utilizing cURL instead. Please refer to this 
>> guide  on 
>> how to send a request via cURL and how to construct the API request.
>>
>> Thanks and regards,
>> Xiaoming, Google Ads API Team
>>
>>  
>> [image: Google Logo] 
>> Xiaoming 
>> Google Ads API Team 
>>   
>>
>> ref:_00D1U1174p._5004Q2GIcDn: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 
"AdWords API and Google Ads 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/425937d9-6376-49c8-b6d9-fe25db8af2ben%40googlegroups.com.


Re: Reporting API usage

2021-04-30 Thread Peter Petrov
OK, thank you. 

So this guide is about the REST API.

1) So I guess this means I will probably get the results back in JSON 
format, right?  
No option to get back XML or CSV (as in the old API), right? 

In the old API the format was being controlled by a field passed in with 
the report definition. 
CSV
XML
And that report definition was part of the body sent with the POST request. 


2) Are the 4 headers given in the example the only headers one could pass 
in? 

--header "Content-Type: application/json"  
--header "developer-token: ${DEVELOPER_TOKEN}"  
--header "login-customer-id: ${MANAGER_CUSTOMER_ID}"  
--header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}"  

Are these any additional headers one could pass in? 


3) I am asking the previous question because the old API had headers like  

 skipReportHeader 
 skipReportSummary 
 clientCustomerId 

These are not there anymore, correct? 


4) Btw, I have troubles to call this HTTPs endpoint/URL 

https://googleads.googleapis.com/v${API_VERSION}/customers/${CUSTOMER_ID}/googleAds:searchStream
 

but I will keep investigating. The error is not very informative - just 
HTTP code 400. 
I am passing in the 4 headers mentioned above so I am not sure what I am 
doing wrong. 
Any ideas? 








On Thursday, April 29, 2021 at 3:24:53 PM UTC-4 adsapiforumadvisor wrote:

> Hi Peter,
>
> Thank you for reaching out. Using the client library is not required. You 
> could make API calls by utilizing cURL instead. Please refer to this guide 
>  on how to 
> send a request via cURL and how to construct the API request.
>
> Thanks and regards,
> Xiaoming, Google Ads API Team
>
>  
> [image: Google Logo] 
> Xiaoming 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2GIcDn: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 
"AdWords API and Google Ads 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/e25f6739-342c-4f29-97a7-090a60a25bben%40googlegroups.com.


RE: Reporting API usage

2021-04-29 Thread Google Ads API Forum Advisor Prod
Hi Peter,

Thank you for reaching out. Using the client library is not required. You could 
make API calls by utilizing cURL instead. Please refer to this guide on how to 
send a request via cURL and how to construct the API request.

Thanks and regards,
Xiaoming, Google Ads API Team


Xiaoming
Google Ads API Team
ref:_00D1U1174p._5004Q2GIcDn: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 
"AdWords API and Google Ads 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/AJA120QSCB90009q4pBZ2pRNmSBivHP2Nm1A%40sfdc.net.


Reporting API usage

2021-04-29 Thread Peter Petrov
I am looking at the "new" (new for me) Google Ads API v6.
I am working with the Java client lib version 10.1.0.  

My job is to get reports... e.g. a campaign performance report. 
Currently I am using the old AdWords API to get reports. 

In fact currently I am not using any API objects, I just http POST to this 
URL 

https://adwords.google.com/api/adwords/reportdownload/v201809

I mean, I post an XML report definition, and I get immediately data back 
either in XML or in CSV format. Of course I send there also the necessary 
headers etc. 

Now... In the Google Ads API v6, I understand that there's no XML report 
definitions any more. First of all, is that indeed so? My understanding is 
that they are replaced by a SQL-like format/syntax.

OK, using this SQL-like syntax and a GoogleAdsClient object I was able to 
pull some reporting data. But if possible I prefer not to use any API 
objects. I just want to http POST to some URL (sending the proper headers 
and payload) just like I did before and get textual data back in XML or in 
CSV format. So basically I want to do lower-level communication to avoid 
all the overhead of serializing/de-serializing API objects, calling getters 
on them, etc., etc. 

Is that still possible? 

Many thanks in advance. 







-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/7eedaeef-e56c-49b7-9690-87e65d86bfd2n%40googlegroups.com.