Andrew June
Andrew June

Reputation: 1

Is there a way to get the space used and space available for a Google shared drive using the Drive API?

I see information regarding getting quota information for a non shared drive for a specific user. I am looking to monitor when a shared drive may run low on space using Python.

Upvotes: 0

Views: 659

Answers (1)

Rafa Guillermo
Rafa Guillermo

Reputation: 15367

Answer:

You can not get this information for the reason there is no "maximum available space" for shared Drives in the same way that regular Drives have.

More Information:

As per the documentation on Shared drive limits, regarding storage limits, only the following limits exist:

  • A shared drive can contain a maximum of 400,000 files and folders.
  • Individual users can only upload 750 GB each day between My Drive and all shared drives.
  • The maximum individual file size that you can upload or synchronize is 5 TB.

This does mean, that practically, the storage limit for a Shared Drive is 2 Exabytes (so yeah, 1,000,000 Terabytes).

This is... actually incomprehensibly large, but needless to say if you're worried about hitting your Shared Drive's maximum available space, then you can stop. Wikipedia even claims that this would be around 2/5 of words ever spoken by humanity

The other way of looking at this:

The main limit you could ever concievably have to worry about is the 750 GB per day per user. You can get this information with a regular Files: list request, and make a calculation as to how much data was uploaded in the last 24 hours, and by whom.

References:

Upvotes: 1

Related Questions