Can the Licensing Manager API retrieve Drive quota usage? - google-drive-api

The Google Licensing Manager API, https://developers.google.com/google-apps/licensing/, can be used to assign Drive licenses to users in an Apps domain. How can you retrieve the amount of storage a given user is actually using and not just what their total quota is?

This can't be done in the Licensing Manager API, it only retrieves information about the actual storage licences. The amount of quota a user has actually used can be found with about call in the Drive API, documented at https://developers.google.com/drive/v2/reference/about/get. Specifically the quotaBytesUsed property.

Related

Getting storage usage from Google Contact/People API?

I am trying to get the remaining space of one's Google Contact.
This FAQ says every account has 20MB / 25000 contacts. But the People API does not have any REST resource to list one's storage.
How can I get the storage usage/space through People API?
Answer:
This information is not available to People API nor the deprecated Contacts API.
Workaround:
In order to see how many contacts you can still add, you can check how many contacts you currently have via people.connections.list and deduct that from the contact limit (25,000).
File a feature request:
If you think this functionality could be useful, I'd suggest you to file a feature request.

Enabling Advanced Google Service in Apps Script for Google Drive API - Does it cost anything?

I need to enable the Advanced Drive Google service in order to be able to use Google Drive API. I need it because, only with this API, can I share Google Drive files programatically without sending emails to the users.
When enabling Advanced Google services, I'm asked to agree to the Google Cloud Platform and Google APIs Terms of Service. My question is, "Do I expose my account / my company, to costs by enabling advanced Google services?" I just want to use Google Drive API to make use of one method only.
There is no cost to enabling the Google Drive API for use with Apps Script.
Use of the Google Drive API doesn't have a cost associated with it.
There are three quota limits for the Drive API, which are controlled through the Google Cloud Platform, not through Apps Script. It's highly doubtful that you'll hit those limits. The limit for Queries per day is 1 Billion. But even if you did hit a Drive API quota limit, there is no cost, the API would just stop working.
To be charged for any API, you'd need to enable billing and set up a billing account. It's good to understand the liability before making a commitment. If you ever decide to pay for a service, make sure that you know how to shut it off. There should be tools to keep track of how much of a quota that you've used.
If you hit the storage limit in your Google Drive, then you can "upgrade" to a higher storage limit, which would cost you something. Users with personal (free/consumer) accounts can pay for more Drive storage with a product named Google One.
If you have a Google Workspace account, then extra storage can be purchased also, but it's different than Google One.
There are Cloud Computing Storage products that do cost something, but they probably have a free tier.

How can I find my google drive service account usage limits?

I created service account to consume Google Drive REST API for domain wide delegation. But from document I came to know that there are some limits API consumption such as
Number of request per day per app.
Number of requests/second/user etc.
Now my questions are
How can I find these exact numbers of my google service account?
What are default numbers for free account?
Is these numbers vary from service account and install app type applications?
Can anyone one help me please?
Each request to the Google API will be counted. You can monitor your quota details from Google Developer Console.
APIs & Auth -> APIs -> Select the API -> Navigate to Quota tab.
Currently for the Drive API it reads "Courtesy limit: 1,000,000,000 requests/day". It's a per app quota.
After you've enabled the Drive API you can also set a per user rate limit (by default 100 req/sec) to prevent one user from depleting your app's quota. That's available in the "Quotas" tab.
There is also a link to request more quota in the "Quotas" tab in case you need more than the default 1B req/day.

Google Drive/Google Cloud Storage

Does google drive use the broader google cloud storage infrastructure as it's backend? If it does is there any way to get the bucket metadata related to a drive account via an api call?
Whether it physically uses the same infrastructure or not, it doesn't logically. There's no bucket corresponding to a user's Drive, at least not publicly.

To retrieve a domain's maximum number of users from google apps for business

Can we retrieve a domain's maximum number of users, Using google script and OAuth 2.0 or Total purchased licences in a domain.
You can get the maximumNumberOfUsers and currentNumberOfUsers using the Admin Settings API detailed here.