I am looking for a Google Apps API that allows me to retrieve all domain names associated with the Google Apps instance.
I am looking for the programmatic equivalent of this: https://www.google.com/a/cpanel/gcompany.nl/DomainSettingsDomains
As an added bonus it would be really nice if there is also a way to check if a given domain name is used as an Alias or in a Multi-domain configuration.
Additional requirements:
- I need this API to be available using a Google App Engine app (Java).
- the API must allow authentication using OAUTH.
- The owner of the app is NOT a Google Apps Reseller (no special privileges).
- The app only needs readonly access.
Your answer is correct. There’s a issue requesting an API call to retrieve the domains associated with an instance. I’d suggest starring it:
http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=2278
The “lightest weight” retrieve all users function is the Retrieve All Organization Users since only the primary email and Org is returned for each user, not details like first and last name, suspended status, admin status, etc:
https://developers.google.com/google-apps/provisioning/#retrieving_organization_users_experimental
domain aliases and secondary domains which have no users won’t be returned by this functionality of course.
Jay