I support three versions of GAM.
GAM-N is GAM with some enhancements and better error checking.
GAM and GAM-N are drop-in replacements for Jay's version.
GAMADV-X is an extensive rewrite/enhancement of GAM.
The following discusses GAMADV-X.
There is a configuration file, gam.cfg, that is used instead of the various environment variables and signal files.
[DEFAULT]
activity_max_results = 100
auto_batch_min = 0
batch_size = 50
cache_dir = /Users/admin/.gam/gamcache
cache_discovery_only = false
charset = utf-8
client_secrets_json = client_secrets.json
config_dir = /Users/admin/.gam
customer_id = 0000000000
debug_level = 0
device_max_results = 500
drive_dir = /Users/admin/Downloads
drive_max_results = 1000
email_batch_size = 100
extra_args =
no_browser = false
no_cache = false
no_update_check = false
no_verify_ssl = false
num_threads = 5
oauth2_txt = oauth2.txt
oauth2service_json = oauth2service.json
section =
show_counts_min = 1
show_gettings = true
user_max_results = 500
[foo]
customer_id = 1111111111
config_dir = foo
[goo]
customer_id = 2222222222
config_dir = goo
If you only support one domain, you'd have just the [Default] section. If you support multiple domains, you'd have an additional section per domain.
When you say gam <Commands>, the values from the [Default] section are used, main.com is the domain in this case. To select the foo.com domain on the fly, you say: gam select foo <Commands>, foo.com is the domain. To change to the goo.com domain for several commands, you say: gam select goo save. Subsequent commands without a select will use the [goo] section. When you're ready to switch back to the default section: gam select default save.
** Contacts **
Domain shared contacts and user contacts are supported.
** Sites **
There is basic support for sites and site ACLs.
** Calendars **
In addition to managing access to existing calendars, you can create and manage new calendars.
You can add, update, delete and review events in calendars.
** Gmail **
There are additional commands for processing email messages.
** Data Selection/Processing **
There are powerful data selection capabilities. Suppose your SIS produces the following CSV file each night listing the parent email addresses for your school grades.
You have to sync the membership of the group representing each grade. There is one line per family per grade; here are the CSV file headers for the file GradeEmails.csv.
Grade,Email1,Email2
One command does all of the work, no additional file processing is required.
Gam reads the CSV file, produces the list of grades and the associated members and does the syncs.
gam update groups csvkmd GradeEmails.csv keyfield Grade datafield Email1:Email2 sync member csvdata Email1:Email2
Most commands have been extended to operate on collections of items rather that just a single item.
** Cleaner output **
The output from commands is easier to read and gives more information about what actions have taken place and what errors have occurred.
** CSV file output **
Commands that produce CSV files have been enhanced to give you better control over the format and content of the file.
** Command line arguments **
There is extensive error checking of the command line arguments; when you make a mistake, the location and nature of the problem is indicated.
As Gam grew, the command syntax of similar commands was not always consistent. Where possible, while trying to support backwards compatibility,
this has been corrected.
** API error checking **
All API calls are error checked; when processing a list of items, if an error occurs, it is noted and processing continues.
** API batch processing **
Several commands use API batch processing to speed up operations. Adding/removing users to org units, groups, courses are examples.
Ross