Hi Doug, Unfortunately the Reporting API numbers do not include stats from IMAP usage or the case where a user is using a forwarding ID. You can choose to select candidates based on last_webmail_date and last_pop_date from Reporting API and send a mail to them asking them to confirm usage by replying within a certain number of days before you delete the account.
-Anirudh On Mar 18, 11:20 pm, DougC <[email protected]> wrote: > Hi all, > > I manage over 30 Google domains, that are sub-domains for our field > offices. Our headquarters is foo.com, our field offices are > bos.foo.com, nyc.foo.com, etc. We've become much more efficient with > our email, since we delegate email administration to an admin in each > office. We also have the benefit of accessing (via API) all current > users, which we use to build a in-house field directory. > > So the good news is, each field office admin is really good about > creating new user accounts. > > The bad news is, each field office admin is really bad about deleting > accounts. (employee leaves or is transferred) > > I'd like to write a Python script that does some automatic daily > cleanup. My thinking is, if a person hasn't logged into their mail > account within the last 60 days, chances are, this person is gone. As > I understand it, looking at the available Google Apps APIs, I need to > use 2 APIs, the Reporting API to get login date info and the > Provisioning API, to toggle the "suspended" attribute with the > SuspendUser() method call. > > Before I start on this, I'd like to know if anyone else has done > something similar. It's unfortunate that I need to use 2 different > APIs (and logins) to accomplish this, unless there some secret API > that I don't know about. This is entirely possible due to the current > state of the API documentation. > > Any pointers or suggestions would be greatly appreciated. > > TIA, > > Doug --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Apps APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-apps-apis?hl=en -~----------~----~----~----~------~----~------~--~---
