Re: Retrieving a tree of all customers

2021-05-20 Thread Pablo Lemos
Well, the same problem you have to persist it, we have too. :)
Those things change all the time and cache gets unreliable.

One thing that would be interesting is if we could query if there was any
change on the tree. That way we could create safe caches and quickly check
if we need to rebuild it.

Em qui., 20 de mai. de 2021 às 15:12, Google Ads API Forum Advisor Prod <
adsapiforumadvi...@gmail.com> escreveu:

> Hi,
>
> Thank you for reaching out. The hierarchical tree of the accounts are
> built dynamically as the tree structure of the accounts itself is dynamic
> and keeps changing all the time. It would be impractical to persist all the
> subtree structure for each node in the tree as the amount of data to be
> stored would be huge. I would say you could use your local cache to save
> the accounts info that you have retrieved so you don’t have to query them
> each time.
>
> Thanks and regards,
> Xiaoming, Google Ads API Team
>
>
> [image: Google Logo]
> Xiaoming
> Google Ads API Team
>
>
> ref:_00D1U1174p._5004Q2HCG9G: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/CA%2BROxbnz9c4mpmja9sbd4jiKKwAS9yG%2B1OkMK_jc8rRnBBkAUQ%40mail.gmail.com.


RE: Retrieving a tree of all customers

2021-05-20 Thread Google Ads API Forum Advisor Prod
Hi,

Thank you for reaching out. The hierarchical tree of the accounts are built 
dynamically as the tree structure of the accounts itself is dynamic and keeps 
changing all the time. It would be impractical to persist all the subtree 
structure for each node in the tree as the amount of data to be stored would be 
huge. I would say you could use your local cache to save the accounts info that 
you have retrieved so you don’t have to query them each time.

Thanks and regards,
Xiaoming, Google Ads API Team


Xiaoming
Google Ads API Team
ref:_00D1U1174p._5004Q2HCG9G: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/9YoAy0QTF3W2003sdM0SOtQE2lh-EtESs34Q%40sfdc.net.


Re: Retrieving a tree of all customers

2021-05-19 Thread beter...@gmail.com
We are suffering from the same problem. Clients with a big amount of 
accounts can take minutes to list all available accounts.
This problem is the same with both Adwords and Google Ads API.
There should be a simple "list all accounts" method the would actually 
return all accounts available for a given user token.

Em terça-feira, 15 de janeiro de 2019 às 17:20:07 UTC-2, 
googleadsapi...@google.com escreveu:

> Hello Marc,
>
> Thanks for your patience. I checked with my team and confirmed that it is 
> an expected behavior of the customer_client, in fact in Google Ads API only 
> one resource is responsible for a field to maintain normalization. Since 
> the descriptive_name is a field in Customer resource, for each of the 
> client_customer would have to call customer resource. Please let me know if 
> you have any further questions.
>
>
> Regards,
> Sai Teja, Google Ads API Team
>
>
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> Was your question answered? Please rate your experience with us by taking 
> a short survey.
> If not -- reply to this email and tell us what else we can do to help.
>
> Take Survey 
> 
>
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
> On 01/10/19 16:00:51 adwordsapia...@google.com wrote:
>
> Hello Marc,
>
> To get the accessible accounts for a user you can use 
> CustomerService.ListAccessibleCustomers 
> 
>  which 
> returns resource names of customers directly accessible by the user 
> authenticating the call and then you can use the query specified earlier to 
> get the entire hierarchy. I used the same query and got all the accounts 
> under my MCC, the sub MCCs and accounts under that sub MCCs as well. 
>
> Also the Customer.id and customer.descriptive_name are same for all as the 
> call made with that account and customer object refers to. I am getting in 
> touch with the team to see if there is a possibility to get them in a 
> single call. I will update you once I have more information. meanwhile you 
> can double check whether you are receiving all the accounts in the 
> hierarchy under your MCC with that query. If not, please share the query 
> and response along with the email address of the user authenticating the 
> API call to take a closer look.
>
> Regards,
> Sai Teja, Google Ads API Team
>
>
> On Thursday, January 3, 2019 at 6:34:16 AM UTC-5, Marc Selman wrote:
>
> I'm trying to retrieve a complete nested tree of all customers (and if 
> it's a manager account, the customers below that etc.)
> To do this I'm using the new Google Ads API (v0.7) to retrieve the 
> CustomerClientLinks recursively and for every link I'm using GetCustomer to 
> retrieve the customer information such as the DescriptiveName.
> But for a simple tree with two levels and a total of 37 customers this 
> takes around a minute.
>
> The API methods seem rather slow. Is that normal?
>
> Also, I need to retrieve the links and the customerdata for every found 
> customerId to check if they have subaccounts and to get the name.
> Because of this I need to perform a lot of calls which could (with a large 
> tree) easily hit the rate limit.
> It would be better if I could retrieve all the available customers (paged) 
> in one call instead of having to recursively find them.
>
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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 adwor...@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.
> Visit this group at https://groups.google.com/group/adwords-api.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/adwords-api/2bd6f102-4141-44ce-a435-835d3dea8509%40googlegroups.com
>  
> 

RE: Retrieving a tree of all customers

2019-01-15 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hello Marc,

Thanks for your patience. I checked with my team and confirmed that it is
an expected behavior of the customer_client, in fact in Google Ads API only
one resource is responsible for a field to maintain normalization. Since
the descriptive_name is a field in Customer resource, for each of the
client_customer would have to call customer resource. Please let me know if
you have any further questions.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 01/10/19 16:00:51 adwordsapiadvisor+t...@google.com wrote:

Hello Marc,

To get the accessible accounts for a user you can use
CustomerService.ListAccessibleCustomers
  
which

returns resource names of customers directly accessible by the user
authenticating the call and then you can use the query specified earlier to
get the entire hierarchy. I used the same query and got all the accounts
under my MCC, the sub MCCs and accounts under that sub MCCs as well.

Also the Customer.id and customer.descriptive_name are same for all as the
call made with that account and customer object refers to. I am getting in
touch with the team to see if there is a possibility to get them in a
single call. I will update you once I have more information. meanwhile you
can double check whether you are receiving all the accounts in the
hierarchy under your MCC with that query. If not, please share the query
and response along with the email address of the user authenticating the
API call to take a closer look.

Regards,
Sai Teja, Google Ads API Team


On Thursday, January 3, 2019 at 6:34:16 AM UTC-5, Marc Selman wrote:

I'm trying to retrieve a complete nested tree of all customers (and if it's
a manager account, the customers below that etc.)
To do this I'm using the new Google Ads API (v0.7) to retrieve the
CustomerClientLinks recursively and for every link I'm using GetCustomer to
retrieve the customer information such as the DescriptiveName.
But for a simple tree with two levels and a total of 37 customers this
takes around a minute.

The API methods seem rather slow. Is that normal?

Also, I need to retrieve the links and the customerdata for every found
customerId to check if they have subaccounts and to get the name.
Because of this I need to perform a lot of calls which could (with a large
tree) easily hit the rate limit.
It would be better if I could retrieve all the available customers (paged)
in one call instead of having to recursively find them.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/2bd6f102-4141-44ce-a435-835d3dea8509%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 

Re: Retrieving a tree of all customers

2019-01-10 Thread 'Teja Makani' via AdWords API and Google Ads API Forum
Hello Marc,

To get the accessible accounts for a user you can use 
CustomerService.ListAccessibleCustomers 

 which 
returns resource names of customers directly accessible by the user 
authenticating the call and then you can use the query specified earlier to 
get the entire hierarchy. I used the same query and got all the accounts 
under my MCC, the sub MCCs and accounts under that sub MCCs as well. 

Also the Customer.id and customer.descriptive_name are same for all as the 
call made with that account and customer object refers to. I am getting in 
touch with the team to see if there is a possibility to get them in a 
single call. I will update you once I have more information. meanwhile you 
can double check whether you are receiving all the accounts in the 
hierarchy under your MCC with that query. If not, please share the query 
and response along with the email address of the user authenticating the 
API call to take a closer look.

Regards,
Sai Teja, Google Ads API Team


On Thursday, January 3, 2019 at 6:34:16 AM UTC-5, Marc Selman wrote:
>
> I'm trying to retrieve a complete nested tree of all customers (and if 
> it's a manager account, the customers below that etc.)
> To do this I'm using the new Google Ads API (v0.7) to retrieve the 
> CustomerClientLinks recursively and for every link I'm using GetCustomer to 
> retrieve the customer information such as the DescriptiveName.
> But for a simple tree with two levels and a total of 37 customers this 
> takes around a minute.
>
> The API methods seem rather slow. Is that normal?
>
> Also, I need to retrieve the links and the customerdata for every found 
> customerId to check if they have subaccounts and to get the name.
> Because of this I need to perform a lot of calls which could (with a large 
> tree) easily hit the rate limit.
> It would be better if I could retrieve all the available customers (paged) 
> in one call instead of having to recursively find them.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2bd6f102-4141-44ce-a435-835d3dea8509%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Retrieving a tree of all customers

2019-01-10 Thread Marc Selman
Hi Teja,

I'm using a refreshtoken of a Google account that has access to multiple 
Google Ads accounts.
So first I need to get the available customers for that Google account. And 
then for each account I need to query for sub-accounts.
If that account is a manager account I can retrieve the sub-accounts from 
customer_client or customer_client_link.

When I use the query you provided the first two requested properties 
'customer.id' and 'customer.descriptive_name' are always the same; the id 
and name of the manager account itself.
So I still need to query every subaccount id for the descriptive_name. And 
if that subaccount is also a manager account I need to do the same for his 
subaccounts etc.

Marc

Op woensdag 9 januari 2019 21:24:50 UTC+1 schreef Teja Makani:
>
> Hello Marc,
>
> It is expected to result out the details of single account when the CID 
> passed in the program is of non manager account. Just like AdWords API,  
> you could sent the Manager's client customer Id to to get the entire 
> hierarchy. Please give it a try and please elaborate the scenario trying if 
> the problem persists. You could also try the below CURL command from the 
> terminal for the same.
>
> curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN"  -H 
> "developer-token: DEVELOPER_TOKEN"  -H "Content-Type: 
> application/json"  
> https://googleads.googleapis.com/v0/customers/YOUR_MCC_ID/googleAds:search  
> --data '{query: "SELECT customer.id, customer.descriptive_name, 
> customer_client.resource_name, customer_client.client_customer, 
> customer_client.level, customer_client.hidden FROM customer_client"}'
>
> Regards,
> Sai Teja, AdWords API Team
>
>
> On Thursday, January 3, 2019 at 6:34:16 AM UTC-5, Marc Selman wrote:
>>
>> I'm trying to retrieve a complete nested tree of all customers (and if 
>> it's a manager account, the customers below that etc.)
>> To do this I'm using the new Google Ads API (v0.7) to retrieve the 
>> CustomerClientLinks recursively and for every link I'm using GetCustomer to 
>> retrieve the customer information such as the DescriptiveName.
>> But for a simple tree with two levels and a total of 37 customers this 
>> takes around a minute.
>>
>> The API methods seem rather slow. Is that normal?
>>
>> Also, I need to retrieve the links and the customerdata for every found 
>> customerId to check if they have subaccounts and to get the name.
>> Because of this I need to perform a lot of calls which could (with a 
>> large tree) easily hit the rate limit.
>> It would be better if I could retrieve all the available customers 
>> (paged) in one call instead of having to recursively find them.
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7202c8de-0091-413d-9edf-b514f969526d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Retrieving a tree of all customers

2019-01-09 Thread 'Teja Makani' via AdWords API and Google Ads API Forum
Hello Marc,

It is expected to result out the details of single account when the CID 
passed in the program is of non manager account. Just like AdWords API,  
you could sent the Manager's client customer Id to to get the entire 
hierarchy. Please give it a try and please elaborate the scenario trying if 
the problem persists. You could also try the below CURL command from the 
terminal for the same.

curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN"  -H "developer-token: 
DEVELOPER_TOKEN"  -H "Content-Type: application/json"  
https://googleads.googleapis.com/v0/customers/YOUR_MCC_ID/googleAds:search  
--data '{query: "SELECT customer.id, customer.descriptive_name, 
customer_client.resource_name, customer_client.client_customer, 
customer_client.level, customer_client.hidden FROM customer_client"}'

Regards,
Sai Teja, AdWords API Team


On Thursday, January 3, 2019 at 6:34:16 AM UTC-5, Marc Selman wrote:
>
> I'm trying to retrieve a complete nested tree of all customers (and if 
> it's a manager account, the customers below that etc.)
> To do this I'm using the new Google Ads API (v0.7) to retrieve the 
> CustomerClientLinks recursively and for every link I'm using GetCustomer to 
> retrieve the customer information such as the DescriptiveName.
> But for a simple tree with two levels and a total of 37 customers this 
> takes around a minute.
>
> The API methods seem rather slow. Is that normal?
>
> Also, I need to retrieve the links and the customerdata for every found 
> customerId to check if they have subaccounts and to get the name.
> Because of this I need to perform a lot of calls which could (with a large 
> tree) easily hit the rate limit.
> It would be better if I could retrieve all the available customers (paged) 
> in one call instead of having to recursively find them.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/bdafa0bf-29e4-4100-ba2c-237161a971ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Retrieving a tree of all customers

2019-01-09 Thread Marc Selman
Hi Teja,

I'm using the Google Ads .NET client library 
(https://github.com/googleads/google-ads-dotnet) and I can't send a query 
request without a customer ID.
But ofcourse when I send a customer ID I only get the details of that 
specific customer.
Is that a problem with the .NET library or am I missing something else?

Op dinsdag 8 januari 2019 23:05:26 UTC+1 schreef Teja Makani:
>
> Hello Marc,
>
> You could use customer_client 
>  
> resource 
> to fetch the hierarchy of the accounts in a single API call. For example 
> you could use the below query in your sample code to fetch the entire 
> hierarchy in a single API call.
>
> Sample query below:
> .setQuery("SELECT customer.id, customer.descriptive_name, 
> customer_client.resource_name, customer_client.client_customer, 
> customer_client.level, customer_client.hidden FROM customer_client")
>
> Hope this helps you, please let me know if you have any further questions.
>
> Regards,
> Sai Teja, Google Ads API Team
>
> On Thursday, January 3, 2019 at 6:34:16 AM UTC-5, Marc Selman wrote:
>>
>> I'm trying to retrieve a complete nested tree of all customers (and if 
>> it's a manager account, the customers below that etc.)
>> To do this I'm using the new Google Ads API (v0.7) to retrieve the 
>> CustomerClientLinks recursively and for every link I'm using GetCustomer to 
>> retrieve the customer information such as the DescriptiveName.
>> But for a simple tree with two levels and a total of 37 customers this 
>> takes around a minute.
>>
>> The API methods seem rather slow. Is that normal?
>>
>> Also, I need to retrieve the links and the customerdata for every found 
>> customerId to check if they have subaccounts and to get the name.
>> Because of this I need to perform a lot of calls which could (with a 
>> large tree) easily hit the rate limit.
>> It would be better if I could retrieve all the available customers 
>> (paged) in one call instead of having to recursively find them.
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1f533826-6dd7-4ac6-9e62-4fe14d3dab92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Retrieving a tree of all customers

2019-01-08 Thread 'Teja Makani' via AdWords API and Google Ads API Forum
Hello Marc,

You could use customer_client 
 
resource 
to fetch the hierarchy of the accounts in a single API call. For example 
you could use the below query in your sample code to fetch the entire 
hierarchy in a single API call.

Sample query below:
.setQuery("SELECT customer.id, customer.descriptive_name, 
customer_client.resource_name, customer_client.client_customer, 
customer_client.level, customer_client.hidden FROM customer_client")

Hope this helps you, please let me know if you have any further questions.

Regards,
Sai Teja, Google Ads API Team

On Thursday, January 3, 2019 at 6:34:16 AM UTC-5, Marc Selman wrote:
>
> I'm trying to retrieve a complete nested tree of all customers (and if 
> it's a manager account, the customers below that etc.)
> To do this I'm using the new Google Ads API (v0.7) to retrieve the 
> CustomerClientLinks recursively and for every link I'm using GetCustomer to 
> retrieve the customer information such as the DescriptiveName.
> But for a simple tree with two levels and a total of 37 customers this 
> takes around a minute.
>
> The API methods seem rather slow. Is that normal?
>
> Also, I need to retrieve the links and the customerdata for every found 
> customerId to check if they have subaccounts and to get the name.
> Because of this I need to perform a lot of calls which could (with a large 
> tree) easily hit the rate limit.
> It would be better if I could retrieve all the available customers (paged) 
> in one call instead of having to recursively find them.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c19a4e47-02fe-456d-808c-784128b1b051%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Retrieving a tree of all customers

2019-01-07 Thread 'Teja Makani' via AdWords API and Google Ads API Forum
Hello Marc,

Apologies for the delay. I was checking with the team for an alternative 
solution. I will get back to you once I have more information from the 
team. Meanwhile to analyze the performance issue you are facing, could you 
please share the code snippet that is taking more time to fetch the 
hierarchy?

Regards,
Sai Teja, Google Ads API Team

On Thursday, January 3, 2019 at 6:34:16 AM UTC-5, Marc Selman wrote:
>
> I'm trying to retrieve a complete nested tree of all customers (and if 
> it's a manager account, the customers below that etc.)
> To do this I'm using the new Google Ads API (v0.7) to retrieve the 
> CustomerClientLinks recursively and for every link I'm using GetCustomer to 
> retrieve the customer information such as the DescriptiveName.
> But for a simple tree with two levels and a total of 37 customers this 
> takes around a minute.
>
> The API methods seem rather slow. Is that normal?
>
> Also, I need to retrieve the links and the customerdata for every found 
> customerId to check if they have subaccounts and to get the name.
> Because of this I need to perform a lot of calls which could (with a large 
> tree) easily hit the rate limit.
> It would be better if I could retrieve all the available customers (paged) 
> in one call instead of having to recursively find them.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2fa28f02-3d45-4848-b2df-1546f4937b80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.