get name of single account without having to fetch all accounts

47 views
Skip to first unread message

claudia_k

unread,
Nov 30, 2011, 8:40:47 AM11/30/11
to google-analytic...@googlegroups.com
Hi there,

I have an account id and would like to know the name of the Analytics account belonging to this id.
The only way I have seen to do that with the management API is to fetch the entire account feed which lists all accounts and then look in this list for the account id that I have. This seems a lot of work for getting the name of a specific account, especially if I have many accounts in the list.

Is there a way to fetch the data of a single account based in its id?

Thanks for any tips

Claudia

Jeetendra

unread,
Dec 13, 2011, 4:20:51 PM12/13/11
to google-analytic...@googlegroups.com
Currently, there's no way to filter the entities based on a field. You can try fetching partial response to retrieve only the fields that you are interested in. For e.g., if you just need the account ID and name, you can make a query like below, which will only return account ID and name for all the accounts.


Also, note that returned account collection is sorted on account ID. So you could use start-index and max-results parameters to further reduce number of accounts returned. Of course, for this to be effective, you would need to know what page your account is on based on its ID.

Jeetendra.

Chris Harrington

unread,
Dec 14, 2011, 10:01:54 AM12/14/11
to Google Analytics Management API
This would be a good feature request.
Reply all
Reply to author
Forward
0 new messages