Please tell me how to get total and current numbers of Google Workspace Business Starter licenses using customerUsageReports.get (https://developers.google.com/admin-sdk/reports/reference/rest/v1/customerUsageReports/get). When I request accounts:gsuite_unlimited_total_licenses or any kind of license (https://developers.google.com/admin-sdk/reports/v1/appendix/usage/customer/accounts) I always get an empty report.
Asked
Active
Viewed 596 times
1 Answers
0
You are a legend mate!
The reason you get no response is because usage report
is huge and takes time to generate, therefor is about 2 days behind.
So simply, use the "date" parameter to be atleast 2 days back from the day you run the report.
GET https://admin.googleapis.com/admin/reports/v1/usage/dates/{date}
That would be the following format
Represents the date the usage occurred. The timestamp is in the ISO 8601 format, yyyy-mm-dd.
We recommend you use your account's time zone for this.
Reference : https://developers.google.com/admin-sdk/reports/reference/rest/v1/customerUsageReports/get

Vasil Nikolov
- 667
- 6
- 16