Quota Exceeded Error

662 views
Skip to first unread message

Shane Bayles

unread,
Jun 7, 2022, 3:36:12 PM6/7/22
to GAM for Google Workspace
I am trying to query devices and write the data to a Google Sheet and am getting the error below.  Any help with the error or a better way to accomplish this would be great!!

Gam Version:
C:\Users\program>gam version
GAMADV-XTD3 6.21.01 - https://github.com/taers232c/GAMADV-XTD3 - pyinstaller
Ross Scroggs <ross.s...@gmail.com>
Python 3.10.4 64-bit final
Windows 10 10.0.17763 SP0 Multiprocessor Free AMD64

Error:
Print Failed: 403: quotaExceeded - Quota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'admin.googleapis.com' for consumer 'project_number:XXXXXXXXXXXXXXX'.

Command:
gam cros_ou "/WISD Devices/Student Devices/Tech Storage" print cros todrive tdupdatesheet  tdfileid sheetIDHere tdsheet Devices tdtitle "2022 Summer Device Check Sheet (Responses)" tdsheet "Tech Storage Devices"  tdclearfilter true fields ou asset serialnumber location osversion status

Kim Nilsson

unread,
Jun 8, 2022, 1:39:49 AM6/8/22
to GAM for Google Workspace
Ross, I don't know why cros_ou is failing.

My comments as I was testing.

Does printing all devices work fine?
Then perhaps do that and use csv_output_row_filter to only include those in the /WISD Devices/Student Devices/Tech Storage ou.

I don't know how "API expensive" the cros_ou query is. I thought basic queries were cheap.
It worked like a charm for me, and I even used cros_ou_and_children since my devices live in sub-OUs of my /Students OU.

Perhaps you had other processes running simultaneously, and you ran out of quota. Then just running the command later or the next day should be fine.

HAH! I too was affected.
The resulting Sheet only got the first 3731 devices of 4536 found.

So I tried an alternative syntax to accomplish the same thing.

$ gam redirect csv - multiprocess todrive tdupdatesheet tdfileid sheetIDHere tdsheet Devices tdtitle "2022 Summer Device Check Sheet (Responses)" tdsheet "Tech Storage Devices" tdclearfilter true cros_ou_and_children "/_Chromebooks" print cros fields ou asset serialnumber location osversion status

Same result.

Again, but removing the tdclearfilter true command.
Same result. Fails randomly somewhere after 3700 devices.

Trying my initial idea with the csv_output_row_filter.

gam config csv_output_row_filter "orgUnitPath:regex:_Chromebooks" redirect csv - multiprocess todrive
 tdupdatesheet tdfileid sheetIDHere tdsheet Devices tdtitle "2022 Summer Device Check Sheet (Responses)" tdsheet "Tech Storage Devices" tdclearfilter true print cros fields ou asset serialnumber location osversion status

WORKED LIKE A CHARM!

Using csv_output_row_filter doesn't use any API query, and instead does the filtering locally on your device, not restricted by any API quota.

Ross Scroggs

unread,
Jun 8, 2022, 8:46:34 AM6/8/22
to google-ap...@googlegroups.com
Shane/KIm,

gam cros_ou "/WISD Devices/Student Devices/Tech Storage" print cros todrive tdupdatesheet  tdfileid sheetIDHere tdsheet Devices tdtitle "2022 Summer Device Check Sheet (Responses)" tdsheet "Tech Storage Devices"  tdclearfilter true fields ou asset serialnumber location osversion status

This command proceeds as follows:
cros_ou "/WISD Devices/Student Devices/Tech Storage" - get a list of all the devices in the OU
print cros ... - make an API call per device in the list to get the desired fields
This is very expensive in terms of API calls

Try it this way:
gam  print cros cros_ou "/WISD Devices/Student Devices/Tech Storage" todrive tdupdatesheet  tdfileid sheetIDHere tdsheet Devices tdtitle "2022 Summer Device Check Sheet (Responses)" tdsheet "Tech Storage Devices"  tdclearfilter true fields ou asset serialnumber location osversion status
This makes one API call the list the devices with their data

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/faa49b8d-e872-40bf-aaff-833b231c56aan%40googlegroups.com.

Bayles, Shane

unread,
Jun 8, 2022, 10:54:19 AM6/8/22
to google-ap...@googlegroups.com
That did the trick.  Thanks again!!



--
Shane Bayles
Google Specialist
Waller ISD

Check out the WISD Technology Department for all your training needs and technology help videos and guides! We are here to help!

STAFF
https://sites.google.com/wallerisd.net/techtraining/home

PARENTS
https://sites.google.com/wallerisd.net/wisdparenthowtos/home


This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachmentsPlease be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited.

Matthew Lametta

unread,
Sep 13, 2022, 9:21:02 AM9/13/22
to GAM for Google Workspace
This thread helped us with a quota exceeded issue when trying to grab chromebook disk space information.  It is good to learn that the ordering of the commands makes a big difference.  Thank you for this post!
Reply all
Reply to author
Forward
0 new messages