Search code examples
gmailgoogle-admin-sdk

Google Apps Admin SDK getting gmail storage space used


I would like to retrieve a users "Mail Storage Used" value from the ADMIN SDK for my google apps account.

I have looked all over for how to get this value and can not find it anywhere.

It seems like it would be here: https://developers.google.com/admin-sdk/reports/v1/reference/usage-ref-appendix-a/users-gmail

But it is not. Does anyone know how I can get space used from Gmail for a google apps account?

Google does this on their own console as shown below? How do I do this through their API?

Screenshot from google apps console


Solution

  • With the release of unified storage (you can read more about it here: http://googleenterprise.blogspot.com/2013/05/bringing-it-all-together-for-google.html), the quota value in gmail is actually being deprecated. This information is highlighted on the yellow banner of the Google Apps Reporting API (https://developers.google.com/google-apps/reporting/).

    So how can you retrieve the quota usage of your account now that only one quota is being applied across three products? You will look up your quota usage using the Drive SDK (https://developers.google.com/drive/v2/reference/about/get) instad. This will give you an idea of how much quota you have used.