You are on page 1of 125

This document describes the GAM command line syntax in modified BNF, see

https://en.wikipedia.org/wiki/Backus-Naur_Form
Skip the History section and start reading at Introduction.

Items on the command line are space separated, when an actual space character is
required, it will be indicated by <Space>.
If an item contains spaces, it should be surrounded by ".

[] optional item
() group items
* item may appear zero or more times
+ item may appear one or more times
| separates alternative items

## Primitives

<Character> ::= a single character


<Digit> ::= 0|1|2|3|4|5|6|7|8|9
<Number> ::= <Digit>+
<Float> ::= <Digit>*.<Digit>+
<Hex> ::= <Digit>|a|b|c|d|e|f|A|B|C|D|E|F
<Space> ::= an actual space character
<String> ::= a string of characters, surrounded by " if it contains spaces
<FalseValues>= false|off|no|disabled|0
<TrueValues> ::= true|on|yes|enabled|1

<Charset> ::= ascii|latin1|mbcs|utf-8|utf-8-sig|utf-16|<String>


<CalendarColorIndex> ::= <Number in range 1-24>
<CalendarColorName> ::=
amethyst|avocado|banana|basil|birch|blueberry|
cherryblossom|citron|cobalt|cocoa|eucalyptus|flamingo|
grape|graphite|lavender|mango|peacock|pistachio|
pumpkin|radicchio|sage|tangerine|tomato|wisteria|
<ColorHex> ::= "#<Hex><Hex><Hex><Hex><Hex><Hex>"
<ColorNameGoogle> ::=
asparagus|bluevelvet|bubblegum|cardinal|chocolateicecream|denim|desertsand|
earthworm|macaroni|marsorange|mountaingray|mountaingrey|mouse|oldbrickred|
pool|purpledino|purplerain|rainysky|seafoam|slimegreen|spearmint|
toyeggplant|vernfern|wildstrawberries|yellowcab
<ColorNameWeb> ::=
aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|
blanchedalmond|
blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|
cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|
darkgray|
darkgrey|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|
darkorchid|
darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|
darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|
firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|
goldenrod|
gray|grey|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|
lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|
lightcyan|
lightgoldenrodyellow|lightgray|lightgrey|lightgreen|lightpink|lightsalmon|
lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|
lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|
mediumblue|
mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|
mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|
navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|
palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|
peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|
salmon|
sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|
slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|
violet|
wheat|white|whitesmoke|yellow|yellowgreen
<ColorName> ::= <ColorNameGoogle>|<ColorNameWeb>
<ColorValue> ::= <ColorName>|<ColorHex>
<DayOfWeek> ::= mon|tue|wed|thu|fri|sat|sun
<EventColorIndex> ::= <Number in range 1-11>
<EventColorName> ::=
banana|basil|blueberry|flamingo|graphite|grape|
lavender|peacock|sage|tangerine|tomato
<FileFormat> ::=
csv|doc|dot|docx|dotx|epub|html|jpeg|jpg|mht|odp|ods|odt|
pdf|png|ppt|pot|potx|pptx|rtf|svg|tsv|txt|xls|xlt|xlsx|xltx|zip|
ms|microsoft|openoffice|
<LabelColorHex> ::=
#000000|#076239|#0b804b|#149e60|#16a766|#1a764d|#1c4587|#285bac|
#2a9c68|#3c78d8|#3dc789|#41236d|#434343|#43d692|#44b984|#4a86e8|
#653e9b|#666666|#68dfa9|#6d9eeb|#822111|#83334c|#89d3b2|#8e63ce|
#999999|#a0eac9|#a46a21|#a479e2|#a4c2f4|#aa8831|#ac2b16|#b65775|
#b694e8|#b9e4d0|#c6f3de|#c9daf8|#cc3a21|#cccccc|#cf8933|#d0bcf1|
#d5ae49|#e07798|#e4d7f5|#e66550|#eaa041|#efa093|#efefef|#f2c960|
#f3f3f3|#f691b3|#f6c5be|#f7a7c0|#fad165|#fb4c2f|#fbc8d9|#fcda83|
#fcdee8|#fce8b3|#fef1d1|#ffad47|#ffbc6b|#ffd6a2|#ffe6c7|#ffffff
<LanguageCode> ::=
ach|af|ag|ak|am|ar|az|be|bem|bg|bn|br|bs|ca|chr|ckb|co|crs|cs|cy|da|de|
ee|el|en|en-gb|en-us|eo|es|es-419|et|eu|fa|fi|fil|fo|fr|fr-ca|fy|
ga|gaa|gd|gl|gn|gu|ha|haw|he|hi|hr|ht|hu|hy|ia|id|ig|in|is|it|iw|ja|jw|
ka|kg|kk|km|kn|ko|kri|ku|ky|la|lg|ln|lo|loz|lt|lua|lv|
mfe|mg|mi|mk|ml|mn|mo|mr|ms|mt|my|ne|nl|nn|no|nso|ny|nyn|oc|om|or|
pa|pcm|pl|ps|pt-br|pt-pt|qu|rm|rn|ro|ru|rw|
sd|sh|si|sk|sl|sn|so|sq|sr|sr-me|st|su|sv|sw|
ta|te|tg|th|ti|tk|tl|tn|to|tr|tt|tum|tw|
ug|uk|ur|uz|vi|wo|xh|yi|yo|zh-cn|zh-hk|zh-tw|zu
<Language> ::=
<LanguageCode>[+|-]|
<String>
<Locale> ::=
''| #Not defined
ar_eg| #Arabic, Egypt
az_az| #Azerbaijani, Azerbaijan
be_by| #Belarusian, Belarus
bg_bg| #Bulgarian, Bulgaria
bn_in| #Bengali, India
ca_es| #Catalan, Spain
cs_cz| #Czech, Czech Republic
cy_gb| #Welsh, United Kingdom
da_dk| #Danish, Denmark
de_ch| #German, Switzerland
de_de| #German, Germany
el_gr| #Greek, Greece
en_au| #English, Australia
en_ca| #English, Canada
en_gb| #English, United Kingdom
en_ie| #English, Ireland
en_us| #English, U.S.A.
es_ar| #Spanish, Argentina
es_bo| #Spanish, Bolivia
es_cl| #Spanish, Chile
es_co| #Spanish, Colombia
es_ec| #Spanish, Ecuador
es_es| #Spanish, Spain
es_mx| #Spanish, Mexico
es_py| #Spanish, Paraguay
es_uy| #Spanish, Uruguay
es_ve| #Spanish, Venezuela
fi_fi| #Finnish, Finland
fil_ph| #Filipino, Philippines
fr_ca| #French, Canada
fr_fr| #French, France
gu_in| #Gujarati, India
hi_in| #Hindi, India
hr_hr| #Croatian, Croatia
hu_hu| #Hungarian, Hungary
hy_am| #Armenian, Armenia
in_id| #Indonesian, Indonesia
it_it| #Italian, Italy
iw_il| #Hebrew, Israel
ja_jp| #Japanese, Japan
ka_ge| #Georgian, Georgia
kk_kz| #Kazakh, Kazakhstan
kn_in| #Kannada, India
ko_kr| #Korean, Korea
lt_lt| #Lithuanian, Lithuania
lv_lv| #Latvian, Latvia
ml_in| #Malayalam, India
mn_mn| #Mongolian, Mongolia
mr_in| #Marathi, India
my_mn| #Burmese, Myanmar
nl_nl| #Dutch, Netherlands
nn_no| #Nynorsk, Norway
no_no| #Bokmal, Norway
pa_in| #Punjabi, India
pl_pl| #Polish, Poland
pt_br| #Portuguese, Brazil
pt_pt| #Portuguese, Portugal
ro_ro| #Romanian, Romania
ru_ru| #Russian, Russia
sk_sk| #Slovak, Slovakia
sl_si| #Slovenian, Slovenia
sr_rs| #Serbian, Serbia
sv_se| #Swedish, Sweden
ta_in| #Tamil, India
te_in| #Telugu, India
th_th| #Thai, Thailand
tr_tr| #Turkish, Turkey
uk_ua| #Ukrainian, Ukraine
vi_vn| #Vietnamese, Vietnam
zh_cn| #Simplified Chinese, China
zh_hk| #Traditional Chinese, Hong Kong SAR China
zh_tw #Traditional Chinese, Taiwan
<MimeTypeShortcut> ::=
gdoc|gdocument|
gdrawing|
gfile|
gfolder|gdirectory|
gform|
gfusion|
gmap|
gpresentation|
gscript|
gsheet|gspreadsheet|
gshortcut|
g3pshortcut|
gsite|
shortcut
<MimeTypeName> ::= application|audio|font|image|message|model|multipart|text|video
<MimeType> ::= <MimeTypeShortcut>|(<MimeTypeName>/<String>)
<ProductID> ::=
nv:<String> |
101001 |
101005 |
101031 |
101033 |
101034 |
101035 |
101036 |
101037 |
Google-Apps |
Google-Chrome-Device-Management |
Google-Drive-storage |
Google-Vault
<SKUID> ::=
nv:<String>:<String> |
20gb | drive20gb | googledrivestorage20gb | Google-Drive-storage-20GB |
50gb | drive50gb | googledrivestorage50gb | Google-Drive-storage-50GB |
200gb | drive200gb | googledrivestorage200gb | Google-Drive-storage-200GB |
400gb | drive400gb | googledrivestorage400gb | Google-Drive-storage-400GB |
1tb | drive1tb | googledrivestorage1tb | Google-Drive-storage-1TB |
2tb | drive2tb | googledrivestorage2tb | Google-Drive-storage-2TB |
4tb | drive4tb | googledrivestorage4tb | Google-Drive-storage-4TB |
8tb | drive8tb | googledrivestorage8tb | Google-Drive-storage-8TB |
16tb | drive16tb | googledrivestorage16tb | Google-Drive-storage-16TB |
cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-
Management |
cloudidentity | identity | 1010010001 |
cloudidentitypremium | identitypremium | 1010050001 |
cloudsearch | 1010350001 |
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 |
gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 |
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 |
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 |
gsuitegov | gafg | gsuitegovernment | Google-Apps-For-Government |
gsuitelite | gal | gsl | lite | Google-Apps-Lite |
gwep | workspaceeducationplus | 1010310008 |
gwepstaff | workspaceeducationplusstaff | 1010310009 |
gwepstudent | workspaceeducationplusstudent | 1010310010 |
gwes | workspaceeducationstandard | 1010310005 |
gwesstaff | workspaceeducationstandardstaff | 1010310006 |
gwesstudent | workspaceeducationstandardstudent | 1010310007 |
gwetlu | workspaceeducationupgrade | 1010370001 |
meetdialing | googlemeetglobaldialing |
postini | gams | gsuitegams | gsuitepostini | gsuitemessagesecurity |
Google-Apps-For-Postini |
standard | free | Google-Apps |
vault | googlevault | Google-Vault |
vfe | googlevaultformeremployee | Google-Vault-Former-Employee |
voicepremier | gvpremier | googlevoicepremier | 1010330002 |
voicestandard | gvstandard | googlevoicestandard | 1010330004 |
voicestarter | gvstarter | googlevoicestarter | 1010330003 |
workspacefrontline | workspacefrontlineworker | 1010020030 |
wsbizplus | workspacebusinessplus | 1010020025 |
wsbizplusarchived | workspacebusinessplusarchived | 1010340003 |
wsbizstan | workspacebusinessstandard | 1010020028 |
wsbizstart | workspacebusinessstarter | 1010020027 |
wsentess | workspaceenterpriseessentials | 1010060003 |
wsentplus | workspaceenterpriseplus | gae | gse | enterprise |
gsuiteenterprise | 1010020020 |
wsentstan | workspaceenterprisestandard | 1010020026 |
wsentstanarchived | workspaceenterprisestandardarchived | 1010340004 |
wsess | workspaceesentials | gsuiteessentials | essentials | d4e |
driveenterprise | drive4enterprise | 1010060001

## Items built from primitives

<Boolean> ::= <TrueValues>|<FalseValues>


<ByteCount> ::= <Number>[m|k|b]
<CIDRnetmask> ::= <Number>.<Number>.<Number>.<Number>/<Number>
<Year> ::= <Digit><Digit><Digit><Digit>
<Month> ::= <Digit><Digit>
<Day> ::= <Digit><Digit>
<Hour> ::= <Digit><Digit>
<Minute> ::= <Digit><Digit>
<Second> ::= <Digit><Digit>
<MilliSeconds> ::= <Digit><Digit><Digit>
<Date> ::=
<Year>-<Month>-<Day> |
(+|-)<Number>(d|w|y) |
never|
today
<DateTime> ::=
<Year>-<Month>-<Day>(<Space>|T)<Hour>:<Minute> |
(+|-)<Number>(m|h|d|w|y) |
never|
now|today
<Time> ::=
<Year>-<Month>-<Day>(<Space>|T)<Hour>:<Minute>:<Second>[.<MilliSeconds>](Z|
(+|-(<Hour>:<Minute>))) |
(+|-)<Number>(m|h|d|w|y) |
never|
now|today
<RegularExpression> ::= <String>
See: https://docs.python.org/3/library/re.html
<ProjectID> ::= <String>
Must match this Python Regular Expression: [a-z][a-z0-9-]{4,28}[a-z0-9]
<ServiceAccountName> ::= <String>
Must match this Python Regular Expression: [a-z][a-z0-9-]{4,28}[a-z0-9]
<SiteName> ::= [a-z,0-9,-]+
<UniqueID> ::= id:<String>|uid:<String>
## Named items

<AccessToken> ::= <String>


<AlertID> ::= <String>
<APIScopeURL> ::= <String>
<APPID> ::= <String>
<ASPID> ::= <String>
<AssetTag> ::= <String>
<BrowserTokenPermanentID> ::= <String>
<BuildingID> ::= <String>|id:<String>
<CAALevelName> ::= <String>
<CalendarACLScope> ::=
<EmailAddress>|user:<EmailAddress>|group:<EmailAddress>|
domain:<DomainName>|domain|default
<CalendarItem> ::= <EmailAddress>|<String>
<GIGroupAlias> ::= <EmailAddress>|<String>
<GIGroupItem> ::= <EmailAddress>|<UniqueID>|groups/<String>
<CIGroupType> ::= customer|group|other|serviceaccount|user
<ChannelCustomerID> ::= <String>
<ChatMember> ::= spaces/<String>/members/<String>
<ChatMessage> ::= spaces/<String>/messages/<String>
<ChatSpace> ::= spaces/<String> | <String>
<ChatThread> ::= spaces/<String>/threads/<String>
<ClassroomInvitationID> ::= <String>
<ClientID> ::= <String>
<CommandID> ::= <String>
<ContactID> ::= <String>
<ContactGroupID> ::= id:<String>
<ContactGroupName> ::= <String>
<ContactGroupItem> ::= <ContactGroupID>|<ContactGroupName>
<CorporaAttribute> ::= alldrives|allteamdrives|domain|onlyteamdrives|user
<CourseAlias> ::= <String>
<CourseAnnouncementID> ::= <Number>
<CourseAnnouncementState> ::= draft|published|deleted
<CourseID> ::= <Number>|d:<CourseAlias>
<CourseMaterialID> ::= <Number>
<CourseMaterialState> ::= draft|published|deleted
<CourseParticipantType> ::= teacher|teachers|student|students
<CourseState> ::= active|archived|provisioned|declined|suspended
<CourseSubmissionID> ::= <Number>
<CourseSubmissionState> ::= new|created|turned_in|returned|reclaimed_by_student
<CourseTopic> ::= <String>
<CourseTopicID> ::= <Number>
<CourseWorkID> ::= <Number>
<CourseWorkState> ::= draft|published|deleted
<CrOSID> ::= <String>
<CustomerID> ::= <String>
<DataStudioAssetID> ::= <String>
<DataStudioPermission> ::=
user:<EmailAddress>|
group:<EmailAddress>|
domain:<DomainName>|
serviceAccount:<EmailAddress>
<DeliverySetting> ::=
allmail|
abridged|daily|
digest|
disabled|
none|nomail
<DeviceID> ::= devices/<String>
<DeviceType> ::= android|chrome_os|google_sync|linux|mac_os|windows
<DeviceUserID> ::= devices/<String>/deviceUsers/<String>
<DomainAlias> ::= <String>
<DomainName> ::= <String>(.<String>)+
<DriveFileACLRole> ::=
commenter|
contentmanager|fileorganizer|
contributor|editor|writer|
manager|organizer|owner|
reader|viewer
<DriveFileACLType> ::= anyone|domain|group|user
<DriveFileID> ::= <String>
<DriveFileURL> ::=
https://drive.google.com/open?id=<DriveFileID>
https://drive.google.com/drive/files/<DriveFileID>
https://drive.google.com/drive/folders/<DriveFileID>
https://drive.google.com/drive/folders/<DriveFileID>?resourcekey=<String>
https://drive.google.com/file/d/<DriveFileID>/<String>
https://docs.google.com>/document/d/<DriveFileID>/<String>
https://docs.google.com>/drawings/d/<DriveFileID>/<String>
https://docs.google.com>/forms/d/<DriveFileID>/<String>
https://docs.google.com>/presentation/d/<DriveFileID>/<String>
https://docs.google.com>/spreadsheets/d/<DriveFileID>/<String>
<DriveFileItem> ::= <DriveFileID>|<DriveFileURL>
<DriveFileName> ::= <String>
<DriveFolderID> ::= <String>
<DriveFolderName> ::= <String>
<DriveFilePermission> ::=
anyone;<DriveFileACLRole>|
anyonewithlink;<DriveFileACLRole>|
domain:<DomainName>;<DriveFileACLRole>|
domainwithlink:<DomainName>;<DriveFileACLRole>|
group:<EmailAddress>;<DriveFileACLRole>|
user:<EmailAddress>;<DriveFileACLRole>
<DriveFilePermissionID> ::= anyone|anyonewithlink|id:<String>
<DriveFilePermissionIDorEmail> ::= <DriveFilePermissionID>|<EmailAddress>
<DriveFileRevisionID> ::= <String>
<DriveLabelID> ::= <String>
<DriveLabelFieldID> ::= <String>
<DriveLabelSelectionID> ::= <String>
<DriveLabelName> ::= labels/<DriveLabelID>[@latest|@published|@<Number>]
<EmailAddress> ::= <String>@<DomainName>
<EmailItem> ::= <EmailAddress>|<UniqueID>|<String>
<EmailReplacement> ::= <String>
<EventID> ::= <String>
<EventName> ::= <String>
<ExportItem> ::= <UniqueID>|<String>
<ExportStatus> ::= completed|failed|inprogrsss
<FeatureName> ::= <String>
<FieldName> ::= <String>
<FileName> ::= <String>
<FileNamePattern> ::= <String>
<FilterID> ::= <String>
<FloorName> ::= <String>
<GroupItem> ::= <EmailAddress>|<UniqueID>|<String>
<GroupRole> ::= owner|manager|member
<GroupType> ::= customer|group|user
<GuardianItem> ::= <EmailAddress>|<UniqueID>|<String>
<GuardianInvitationID> ::= <String>
<HoldItem> ::= <UniqueID>|<String>
<HostName> ::= <String>
<iCalUID> ::= <String>
<JSONData> ::= <String>
<Key> ::= <String>
<LabelID> ::= Label_<String>
<LabelName> ::= <String>
<LabelReplacement> ::= <String>
<Marker> ::= <String>
<MatterItem> ::= <UniqueID>|<String>
<MatterState> ::= open|closed|deleted
<MaximumNumberOfSeats> ::= <Number>
<MessageID> ::= <String>
<Namespace> ::= <String>
<NotesName> ::= notes/<String>
<NumberOfSeats> ::= <Number>
<OrgUnitID> ::= id:<String>
<OrgUnitPath> ::= /|(/<String>)+
<OrgUnitItem> ::= <OrgUnitID>|<OrgUnitPath>
<OtherContactsResourceName> ::= otherContacts/<String>
<ParameterKey> ::= <String>
<ParameterValue> ::= <String>
<Password> ::= <String>
<PeopleResourceName> ::= people/<String>
<PrinterID> ::= <String>
<ProjectID> ::= <String>
Must match this Python Regular Expression: [a-z][a-z0-9-]{4,28}[a-z0-9]
<ProjectName> ::= <String>
Must match this Python Regular Expression: [a-zA-Z0-9 '"!-]{4,30}
<PropertyKey> ::= <String>
<PropertyValue> ::= <String>
<QueryAlert> ::= <String>
See: https://developers.google.com/admin-sdk/alertcenter/guides/query-
filters
<QueryBrowser> ::= <String>
See:
https://support.google.com/chrome/a/answer/9681204#retrieve_all_chrome_devices_for_
an_account
<QueryBrowserToken> ::= <String>
See: https://support.google.com/chrome/a/answer/9949706?ref_topic=9301744
<QueryCalendar> ::= <String>
<QueryCEL> ::= <String>
See: https://cloud.google.com/access-context-manager/docs/custom-access-
level-spec
<QueryContact> ::= <String>
See:
https://developers.google.com/google-apps/contacts/v3/reference#contacts-query-
parameters-reference
<QueryCrOS> ::= <String>
See: https://support.google.com/chrome/a/answer/1698333
<QueryDevice> ::= <String>
See: https://support.google.com/a/answer/7549103
<QueryDriveFile> ::= <String>
See: https://developers.google.com/drive/api/v3/search-files
<QueryDynamicGroup> ::= <String>
See:
https://cloud.google.com/identity/docs/reference/rest/v1/groups#dynamicgroupquery
<QueryGmail> ::= <String>
See: https://support.google.com/mail/answer/7190
<QueryGroup> ::= <String>
See: https://developers.google.com/admin-sdk/directory/v1/guides/search-
groups
<QueryMemberRestrictions> ::= <String>
See:
https://cloud.google.com/identity/docs/reference/rest/v1beta1/SecuritySettings#Memb
erRestriction
<QueryMobile> ::= <String>
See: https://support.google.com/a/answer/7549103
<QueryTeamDrive> ::= <String>
See: https://developers.google.com/drive/api/v3/search-parameters
<QueryUser> ::= <String>
See: https://developers.google.com/admin-sdk/directory/v1/guides/search-
users
<QueryVaultCorpus> ::= <String>
See:
https://developers.google.com/vault/reference/rest/v1/matters.holds#CorpusQuery
<RequestID> ::= <String>
<ResellerID> ::= <String>
<ResourceID> ::= <String>
<SchemaName> ::= <String>
<Section> ::= <String>
<SerialNumber> ::= <String>
<ServiceAccountName> ::= <String>
Must match this Python Regular Expression: [a-z][a-z0-9-]{4,28}[a-z0-9]
<ServiceAccountDisplayName> ::= <String>
Maximum of 100 characters
<ServiceAccountDescrition> ::= <String>
Maximumof 256 chcracters
<ServiceAccountEmail> ::= <ServiceAccountName>@<ProjectID>.iam.gserviceaccount.com
<ServiceAccountUniqueID> ::= <Number>
<ServiceAccountKey> ::= <String>
<SheetEntity> ::= <String>|id:<Number>
<SiteACLScope> ::=
<EmailAddress>|user:<EmailAdress>|group:<EmailAddress>|
domain:<DomainName>|domain|default
<SiteItem> ::= [<DomainName>/]<SiteName>
<S/MIMEID> ::= <String>
<SMTPHostName> ::= <String>
<StudentItem> ::= <EmailAddress>|<UniqueID>|<String>
<Tag> ::= <String>
<TaskID> ::= <String>
<TaskListID> ::= <String>
<TasklistIDTaskID> ::= <TasklistID>/<TaskID>
<SharedDriveACLRole> ::=
commenter|
contentmanager|fileorganizer|
contributor|editor|writer|
manager|organizer|owner|
reader|viewer
<SharedDriveID> ::= <String>
<SharedDriveName> ::= <String>
<ThreadID> ::= <String>
<TimeZone> ::= <String>
See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
<Title> ::= <String>
<ToDriveAttribute> ::=
(tdaddsheet [<Boolean>])|
(tdbackupsheet (id:<Number>)|<String>)|
(tdclearfilter [<Boolean>])|
(tdcopysheet (id:<Number>)|<String>)|
(tddescription <String>)|
(tdfileid <DriveFileID>)|
(tdlocalcopy [<Boolean>])|
(tdlocale <Locale>)|
(tdnobrowser [<Boolean>])|
(tdnoemail [<Boolean>])|
(tdparent (id:<DriveFolderID>)|<DriveFolderName>)|
(tdsheet (id:<Number>)|<String>)|
(tdsheettimestamp [<Boolean>] [tdsheettimeformat <String>])
(tdsheettitle <String>)|
([tdsheetdaysoffset <Number>] [tdsheethoursoffset <Number])|
(tdtimestamp [<Boolean>] [tdtimeformat <String>]
[tddaysoffset <Number>] [tdhoursoffset <Number])|
(tdtimezone <TimeZone>)|
(tdtitle <String>)|
(tdcellwrap clip|overflow|wrap)|
(tdupdatesheet [<Boolean>])|
(tduploadnodata [<Boolean>])|
(tduser <EmailAddress>)
<TransferID> ::= <String>
<URI> ::= <String>
<URL> ::= <String>
<UserItem> ::= <EmailAddress>|<UniqueID>|<String>
<UserName> ::= <<String>
## Lists of basic items

<APIScopeURLList> ::= "<APIScopeURL>(,<APIScopeURL>)*"


<ASPIDList> ::= "<ASPID>(,<ASPID>)*"
<AssetTagList> ::= "<AssetTag>(,<AssetTag>)*"
<CalendarACLScopeList> ::= "<CalendarACLScope>(,<CalendarACLScope>)*"
<CalendarList> ::= "<CalendarItem>(,<CalendarItem>)*"
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
<CIGroupTypeList> ::= "<CIGroupType>(,<CIGroupType>)*"
<ClassroomInvitationIDList> ::=
"<ClassroomInvitationID>(,<ClassroomInvitationID>)*"
<ContactGroupList> ::= "<ContactGroupItem>(,<ContactGroupItem>)*"
<ContactIDList> ::= "<ContactID>(,<ContactID>)*"
<CourseAliasList> ::= "<CourseAlias>(,<CourseAlias>)*"
<CourseAnnouncementIDList> ::= "<CourseAnnouncementID>(,<CourseAnnouncementID>)*"
<CourseAnnouncementStateList> ::=
all|"<CourseAnnouncementState>(,<CourseAnnouncementState>)*"
<CourseIDList> ::= "<CourseID>(,<CourseID>)*"
<CourseMaterialIDList> ::= "<CourseMaterialID>(,<CourseMaterialID>)*"
<CourseMaterialStateList> ::= all|"<CourseMaterialState>(,<CourseMaterialState>)*"
<CourseStateList> ::= all|"<CourseState>(,<CourseState>)*"
<CourseSubmissionIDList> ::= "<CourseSubmissionID>(,<CourseSubmissionID>)*"
<CourseSubmissionStateList> ::=
all|"<CourseSubmissionState>(,<CourseSubmissionState>)*"
<CourseTopicIDList> ::= "<CourseTopicID>(,<CourseTopicID>)*"
<CourseTopicList> ::= "<CourseTopic>(,<CourseTopic>)*"
<CourseWorkIDList> ::= "<CourseWorkID>(,<CourseWorkID>)*"
<CourseWorkStateList> ::= all|"<CourseWorkState>(,<CourseWorkState>)*"
<CrOSIDList> ::= "<CrOSID>(,<CrOSID>)*"
<DataStudioAssetIDList> ::= "<DataStudioAssetID>(,<DataStudioAssetID>)*"
<DataStudioPermissionList> ::= "<DataStudioPermission>(,<DataStudioPermission>)*"
<DeviceIDList> ::= "<DeviceID>(,<DeviceID>)*"
<DeviceUserList> ::= "<DeviceUserID>(,<DeviceUserID>)*"
<DomainNameList> ::= "<DomainName>(,<DomainName>)*"
<DriveFileACLRoleList> ::= "<DriveFileACLRole>(,<DriveFileACLRole>)*"
<DriveFileList> ::= "<DriveFileItem>(,<DriveFileItem>)*"
<DriveFilePermissionList> ::= "<DriveFilePermission>(,<DriveFilePermission)*"
<DriveFilePermissionIDList> ::=
"<DriveFilePermissionID>(,<DriveFilePermissionID>)*"
<DriveFileRevisionIDList> ::= "<DriveFileRevisionID>(,<DriveFileRevisionID>)*"
<DriveFolderIDList> ::= "<DriveFolderID>(,<DriveFolderID>)*"
<DriveLabelIDList> ::= "<DriveLabelID>(,<DriveLabelID)*"
<DriveLabelNameList> ::= "<DriveLabelName>(,<DriveLabelName)*"
<DriveLabelFieldIDList> ::= "<DriveLabelFieldID>(,<DriveLabelFieldID)*"
<DriveLabelSelectionIDList> ::= "<DriveLabelSelectionID>(,<DriveLabelSelectionID)*"
<EmailAddressList> ::= "<EmailAddress>(,<EmailAddress>)*"
<EmailItemList> ::= "<EmailItem>(,<EmailItem>)*"
<EventIDList> ::= "<EventID>(,<EventID>)*"
<EventNameList> ::= "<EventName>(,<EventName>)*"
<ExportStatusList> ::= "<ExportStatus>(,<ExportStatus>)*"
<FeatureNameList> ::= "<FeatureName>(,<FeatureName>)*"
<FieldNameList> ::= "<FieldName>(,<FieldName>)*"
<FileFormatList> ::= "<FileFormat>(,<FileFormat)*"
<FilterIDList> ::= "<FilterID>(,<FilterID>)*"
<GuardianItemList> ::= "<GuardianItem>(,<GuardianItem>)*"
<GuardianInvitationIDList> ::= "<GuardianInvitationID>(,<GuardianInvitationID>)*"
<GroupList> ::= "<GroupItem>(,<GroupItem>)*"
<GroupRoleList> ::= "<GroupRole>(,<GroupRole>)*"
<GroupTypeList> ::= "<GroupType>(,<GroupType>)*"
<LabelIDList> ::= "<LabelID>(,<LabelID)*"
<LabelNameList> ::= "<LabelName>(,<LabelName)*"
<LanguageList> ::= "<Language>(,<Language>)*"
<MatterItemList> ::= "<MatterItem>(,<MatterItem>)*"
<MatterStateList> ::= "<MatterState>(,<MatterState>)*"
<MessageIDList> ::= "<MessageID>(,<MessageID>)*"
<MimeTypeList> ::= "<MimeType>(,<MimeType>)*"
<NamespaceList> ::= "<Namespace>(,<Namespace>)*"
<NotesNameList> ::= "<NotesName>(,<NotesName)*"
<OrgUnitList> ::= "<OrgUnitItem>(,<OrgUnitItem>)*"
<OtherContactsResourceNameList> ::=
"<OtherContactsResourceName>(,<OtherContactsResourceName>)*"
<PeopleResourceNameList> ::= "<PeopleResourceName>(,<PeopleResourceName>)*"
<PrinterIDList> ::= "<PrinterID>(,<PrinterID>)*"
<ProductIDList> ::= "(<ProductID>|SKUID>)(,<ProductID>|SKUID>)*"
<ProjectIDList> ::= "<ProjectID>(,<ProjectID>)*"
<QueryBrowserList> ::= "<QueryBrowser>(,<QueryBrowser>)*"
<QueryCrOSList> ::= "<QueryCrOS>(,<QueryCrOS>)*"
<QueryDeviceList> ::= "<QueryDevice>(,<QueryDevice>)*"
<QueryMobileList> ::= "<QueryMobile>(,<QueryMobile>)*"
<QueryUserList> ::= "<QueryUser>(,<QueryUser>)*"
<ResourceIDList> ::= "<ResourceID>(,<ResourceID>)*"
<SchemaNameList> ::= "<SchemaName>(,<SchemaName>)*"
<SerialNumberList> ::= "<SerialNumber>(,<SerialNumber>)*"
<ServiceAccountKeyList> ::= "<ServiceAccountKey>(,<ServiceAccountKey>)*"
<SiteACLScopeList> ::= "<SiteACLScope>(,<SiteACLScope>)*"
<SiteList> ::= "<SiteItem>(,<SiteItem>)*"
<SKUIDList> ="<SKUID>(,<SKUID>)*"
<SMTPHeaderList> ::= "<SMTPDateHeader|SMTPHeader>(,<SMTPDateHeader|SMTPHeader>)*"
<SharedDriveACLRoleList> ::= "<SharedDriveACLRole>(,<SharedDriveACLRole>)*"
<SharedDriveIDList> ::= "<SharedDriveID>(,<SharedDriveID>)*"
<StringList> ::= "<String>(,<String>)*"
<TasklistIDList> ::= "<TasklistID>(,<TasklistID>)*"
<TasklistIDTaskIDList> ::= "<TasklistIDTaskID>(,<TasklistIDTaskID>)*"
<ThreadIDList> ::= "<ThreadID>(,<ThreadID>)*"
<TimeList> ::= "<Time>(,<Time>)*"
<UserList> ::= "<UserItem>(,<UserItem>)*"

## Quoting rules

Items in a list can be separated by commas or spaces; if an item itself contains a


comma, a space or a single quote, special quoting must be used.
Typically, you will enclose the entire list in double quotes and quote each item in
the list as detailed below.

Items, separated by commas, without spaces, commas or single quotes in the items
themselves
"item,item,item"
Items, separated by spaces, without spaces, commas or single quotes in the items
themselves
"item item item"
Items, separated by commas, with spaces, commas or single quotes in the items
themselves
"'it em','it,em',\"it'em\""
Items, separated by spaces, with spaces, commas or single quotes in the items
themselves
"'it em' 'it,em' \"it'em\""

## Data from a user's Google Sheets file sheet


<UserGoogleDoc> ::=
<EmailAddress> <DriveFileIDEntity>|<DriveFileNameEntity>|
(<SharedDriveEntity> <SharedDriveFileNameEntity>)
<UserGoogleSheet> ::=
<EmailAddress> <DriveFileIDEntity>|<DriveFileNameEntity>|
(<SharedDriveEntity> <SharedDriveFileNameEntity>) <SheetEntity>

## Collections of ChromeOS Devices

Specify a collection of ChromeOS devices by directly specifying them or by


specifiying items that will yield a list of ChromeOS devices.

<CrOSTypeEntity> ::=
(all cros)|
(cros <CrOSIDList>)|
(cros_sn <SerialNumberList>)|
(cros_ou <OrgUnitItem>)|
(cros_ou_and_children <OrgUnitItem>)|
(cros_ous <OrgUnitList>)|
(cros_ous_and_children <OrgUnitList>)|
(cros_ou_query <OrgUnitItem> <QueryCrOS>)|
(cros_ou_and_children_query <OrgUnitItem> <QueryCrOS>)|
(cros_ous_query <OrgUnitList> <QueryCrOS>)|
(cros_ous_and_children_query <OrgUnitList> <QueryCrOS>)|
(cros_ou_queries <OrgUnitItem> <QueryCrOSList>)|
(cros_ou_and_children_queries <OrgUnitItem> <QueryCrOSList>)|
(cros_ous_queries <OrgUnitList> <QueryCrOSList>)|
(cros_ous_and_children_queries <OrgUnitList> <QueryCrOSList>)|
(crosquery <QueryCrOS>)|
(crosqueries <QueryCrOSList>)|
(crosfile|crosfile_sn
(<FileName>|(gdoc <UserGoogleDoc>)
[charset <Charset>] [delimiter <Character>]))|
(croscsvfile|croscsvfile_sn
((<FileName>(:<FieldName>)+)|(gsheet(:<FieldName>)+
<UserGoogleSheet>)|(gdoc:<FieldName>)+ <UserGoogleDoc>)
[charset <Charset>] [warnifnodata] [columndelimiter
<Character>] [quotechar <Character>])
[fields <FieldNameList>]
(matchfield|skipfield <FieldName> <RegularExpression>)*
[delimiter <Character>])|
(datafile cros|cros_sn|cros_ous|cros_ous_and_children
(<FileName>|(gdoc <UserGoogleDoc>) [charset <Charset>] [delimiter
<Character>]))|
(csvdatafile cros|cros_sn|cros_ous|cros_ous_and_children
((<FileName>(:<FieldName>)+)|(gsheet(:<FieldName>)+
<UserGoogleSheet>)|(gdoc:<FieldName>)+ <UserGoogleDoc>)
[charset <Charset>] [warnifnodata] [columndelimiter
<Character>] [quotechar <Character>])
[fields <FieldNameList>]
(matchfield|skipfield <FieldName> <RegularExpression>)*
[delimiter <Character>])|
(csvkmd cros|cros_sn|cros_ous|cros_ous_and_children
(<FileName>|(gsheet <UserGoogleSheet>)|(gdoc <UserGoogleDoc>)
[charset <Charset>] [warnifnodata] [columndelimiter
<Character>] [quotechar <Character>])
[fields <FieldNameList>]
(keyfield <FieldName> [keypattern <RegularExpression>] [keyvalue
<String>] [delimiter <Character>])+
(subkeyfield <FieldName> [keypattern <RegularExpression>] [keyvalue
<String>] [delimiter <Character>])
(matchfield|skipfield <FieldName> <RegularExpression>)*
(datafield <FieldName>(:<FieldName)* [delimiter <Character>])*)|
(croscsvdata <FieldName>(:<FieldName>*))

## Collections of Users

Specify a collection of Users by directly specifying them or by specifiying items


that will yield a list of users.

<UserTypeEntity> ::=
(all users|users_ns|users_susp|users_ns_susp)|
(user <UserItem>)|
(users <UserList>)|
(oauthuser)
(domains|domains_ns|domains_susp <DomainNameListList>)|
(group|group_ns|group_susp|group_inde <GroupItem>)|
(groups|groups_ns|groups_susp|groups_inde <GroupList>)|
(group_inde <GroupItem>)|(groups_inde <GroupList>)|
(group_users|group_users_ns|group_users_susp <GroupList>
[members] [managers] [owners]
[primarydomain] [domains <DomainNameList>] [recursive|
includederivedmembership] end)|
(group_users_select <GroupList>
[members] [managers] [owners]
[notsuspended|suspended] [notarchived|archived]
[primarydomain] [domains <DomainNameList>] [recursive|
includederivedmembership] end)|
(ou|ou_ns|ou_susp <OrgUnitItem>)|
(ou_and_children|ou_and_children_ns|ou_and_children_susp <OrgUnitItem>)|
(ous|ous_ns|ous_susp <OrgUnitList>)|
(ous_and_children|ous_and_children_ns|ous_and_children_susp <OrgUnitList>)|
(courseparticipants <CourseIDList>)|
(students <CourseIDList>)|
(teachers <CourseIDList>)|
(license|licenses|licence|licences <SKUIDList>)|
(query <QueryUser>)|
(queries <QueryUserList>)|
(file
(<FileName>|(gdoc <UserGoogleDoc>)
[charset <Charset>] [delimiter <Character>]))|
(csvfile
((<FileName>(:<FieldName>)+)|(gsheet(:<FieldName>)+
<UserGoogleSheet>)|(gdoc:<FieldName>)+ <UserGoogleDoc>)
[charset <Charset>] [warnifnodata] [columndelimiter
<Character>] [quotechar <Character>])
[fields <FieldNameList>]
(matchfield|skipfield <FieldName> <RegularExpression>)*
[delimiter <Character>])|
(datafile users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|
ous_susp|
ous_and_children|ous_and_children_ns|ous_and_children_susp|
courseparticipants|students|teachers
(<FileName>|(gdoc <UserGoogleDoc>) [charset <Charset>] [delimiter
<Character>]))|
(csvdatafile users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|
ous_susp|
ous_and_children|ous_and_children_ns|ous_and_children_susp|
courseparticipants|students|teachers
((<FileName>(:<FieldName>)+)|(gsheet(:<FieldName>)+
<UserGoogleSheet>)|(gdoc:<FieldName>)+ <UserGoogleDoc>)
[charset <Charset>] [warnifnodata] [columndelimiter
<Character>] [quotechar <Character>])
[fields <FieldNameList>]
(matchfield|skipfield <FieldName> <RegularExpression>)*
[delimiter <Character>])|
(csvkmd users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp|
ous_and_children|ous_and_children_ns|ous_and_children_susp|
courseparticipants|students|teachers
(<FileName>|(gsheet <UserGoogleSheet>)|(gdoc <UserGoogleDoc>)
[charset <Charset>] [warnifnodata] [columndelimiter
<Character>] [quotechar <Character>])
[fields <FieldNameList>]
(keyfield <FieldName> [keypattern <RegularExpression>] [keyvalue
<String>]
[delimiter <Character>])+
(subkeyfield <FieldName> [keypattern <RegularExpression>] [keyvalue
<String>]
[delimiter <Character>])*
(matchfield|skipfield <FieldName> <RegularExpression>)*
(datafield <FieldName>(:<FieldName)* [delimiter <Character>])*)|
(csvdata <FieldName>(:<FieldName>*))

## Collections of Items

Specify a collection of items by directly specifying them; the item type is


determined by context.
<FileSelector> ::=
file <FileName>|(gdoc <UserGoogleDoc>) [charset <Charset>] [delimiter
<Character>]
<CSVFileSelector> ::=
csvfile ((<FileName>(:<FieldName>)+)|(gsheet(:<FieldName>)+
<UserGoogleSheet>)|(gdoc:<FieldName>)+ <UserGoogleDoc>)
[charset <Charset>] [warnifnodata] [columndelimiter
<Character>] [quotechar <Character>])
[fields <FieldNameList>]
(matchfield|skipfield <FieldName> <RegularExpression>)*
[delimiter <Character>]
<CSVkmdSelector> ::=
csvkmd <FileName>|(gsheet <UserGoogleSheet>)|(gdoc <UserGoogleDoc>)
[charset <Charset>] [columndelimiter <Character>]
[quotechar <Character>] [fields <FieldNameList>]
keyfield <FieldName> [keypattern <RegularExpression>] [keyvalue
<String>] [delimiter <Character>]
subkeyfield <FieldName> [keypattern <RegularExpression>] [keyvalue
<String>] [delimiter <Character>]
(matchfield|skipfield <FieldName> <RegularExpression>)*
[datafield <FieldName>(:<FieldName)* [delimiter <Character>]]
<CSVSubkeySelector> ::= csvsubkey <FieldName>
<CSVDataSelector> ::= csvdata <FieldName>(:<FieldName)*

## Named collections

<BrowserEntity> ::=
<DeviceIDList> |
(query:<QueryBrowser>)|(query:orgunitpath:<OrgUnitPath>)|(query
<QueryBrowser>) |
(browserou <OrgUnitItem>) | (browserous <OrgUnitList>) |
<FileSelector> | <CSVFileSelector>
<CalendarACLScopeEntity> ::=
<CalendarACLScopeList> | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVDataSelector>
<CalendarEntity> ::=
<CalendarList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<ClassroomInvitationIDEntity> ::=
<ClassroomInvitationIDList> | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVDataSelector>
<ContactEntity> ::=
<ContactIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<ContactGroupEntity> ::=
<ContactGroupList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector>
| <CSVDataSelector>
<CourseAliasEntity> ::=
<CourseAliasList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<CourseEntity> ::=
<CourseIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector>
<CourseAnnouncementIDEntity> ::=
<CourseAnnouncementIDList> | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVSubkeySelector> | <CSVDataSelector>
<CourseSubmissionIDEntity> ::=
<CourseSubmissionIDList> | <FileSelector> | <CSVFileSelector> |
<CSVDataSelector>
<CourseTopicIDEntity> ::=
<CourseTopicIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector>
| <CSVSubkeySelector> | <CSVDataSelector>
<CourseWorkIDEntity> ::=
<CourseWorkIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector>
| <CSVSubkeySelector> | <CSVDataSelector>
<CourseMaterialIDEntity> ::=
<CourseMaterialIDList> | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVSubkeySelector> | <CSVDataSelector>
<CrOSEntity> ::=
<CrOSIDList> | (cros_sn <SerialNumberList>) |
(query:<QueryCrOS>) | (query:orgunitpath:<OrgUnitPath>) | (query
<QueryCrOS>)
<DataStudioAssetIDEntity> ::=
<DataStudioAssetIDList> | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVDataSelector>
<DataStudioPermissionEntity> ::=
<DataStudioPermissionList> | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVDataSelector>
<DeviceIDEntity> ::=
<DeviceIDList> | (device_sn <SerialNumber>)
(query:<QueryDevice>) | (query <QueryDevice>)
<DeviceFileEntity> ::=
<TimeList> |
(first|last|allexceptfirst|allexceptlast <Number>) |
(before|after <Time>) | (range <Time> <Time>) |
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
<DomainNameEntity> ::=
<DomainNameList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<DriveFileIDEntity> ::=
<DriveFileItem> |
(id <DriveFileItem>) | (id:<DriveFileItem>) |
(ids <DriveFileList>) | (ids:<DriveFileList>)
<DriveFileNameEntity> ::=
(anyname <DriveFileName>) | (anyname:<DriveFileName>) |
(anydrivefilename <DriveFileName>) | (anydrivefilename:<DriveFileName>) |
(name <DriveFileName>) | (name:<DriveFileName>) |
(drivefilename <DriveFileName>) | (drivefilename:<DriveFileName>) |
(othername <DriveFileName>) | (othername:<DriveFileName>) |
(otherdrivefilename <DriveFileName>) | (otherdrivefilename:<DriveFileName>)
<DriveFileQueryEntity> ::=
(query <QueryDriveFile>) | (query:<QueryDriveFile>) |
(fullquery <QueryDriveFile>)
<DriveFileQueryShortcut> ::=
all_files |
all_folders |
all_forms |
all_google_files |
all_non_google_files |
all_shortcuts |
all_3p_shortcuts |
all_items |
my_files |
my_folders |
my_forms |
my_google_files |
my_non_google_files |
my_shortcuts |
my_3p_shortcuts |
my_items |
others_files |
others_folders |
others_forms |
others_google_files |
others_non_google_files |
others_shortcuts |
others_3p_shortcuts |
others_items |
writable_files
<DriveFileEntityShortcut> ::=
alldrives |
mydrive_any |
mydrive_me |
mydrive_others |
onlyteamdrives|onlyshareddrives |
orphans |
ownedby_any |
ownedby_me |
ownedby_others |
root | mydrive |
rootwithorphans|mydrivewithorphans |
sharedwithme_all |
sharedwithme_mydrive |
sharedwithme_notmydrive
<DriveFileEntity> ::=
<DriveFileIDEntity> |
<DriveFileNameEntity> |
<DriveFileQueryEntity> |
<DriveFileQueryShortcut> |
mydrive | mydriveid |
root | rootid |
<SharedDriveIDEntity> [<SharedDriveFileQueryShortcut>] |
<SharedDriveNameEntity> [<SharedDriveFileQueryShortcut>] |
<SharedDriveFileNameEntity> |
<SharedDriveFileQueryEntity> |
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVSubkeySelector>
| <CSVDataSelector>)
<DriveFilePermissionEntity> ::=
<DriveFilePermissionList> |
(json [charset <Charset>] <JSONData>) | (json file <FileName> [charset
<Charset>]) |
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
<DriveFilePermissionIDEntity> ::=
<DriveFilePermissionIDList> |
(json [charset <Charset>] <JSONData>) | (json file <FileName> [charset
<Charset>]) |
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
<DriveFileRevisionIDEntity> ::=
(<DriveFileRevisionID>) | (id[ |:]<DriveFileRevisionID>)
(ids[ |:]<DriveFileRevisionIDList>)
(first|last|allexceptfirst|allexceptlast <Number>)|
(before|after <Time>) | (range <Time> <Time>)|
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
<DriveLabelNameEntity> ::=
<DriveLabelNameList> | <FileSelector> | <CSVFileSelector> |
<CSVDataSelector>
<EmailAddressEntity> ::=
<EmailAddressList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector>
| <CSVDataSelector>
<FilterIDEntity> ::=
<FilterIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<EventIDEntity> ::=
<EventIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<GroupEntity> ::=
<GroupList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<GuardianEntity> ::=
<GuardianList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<GuardianInvitationIDEntity> ::=
<GuardianInvitationIDList> | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVDataSelector>
<LabelIDEntity> ::=
<LabelIDList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
<LabelNameEntity> ::=
<LabelNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
<MessageIDEntity> ::=
<MessageIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<MobileEntity> ::=
<ResourceIDList> |
(query:<QueryMobile>) | (query <QueryMobile>)
<NotesNameEntity> ::=
<NotesNameList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<OrgUnitEntity> ::=
<OrgUnitList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector>
<OtherContactsResourceNameEntity> ::=
<OtherContactsResourceNameNameList> | <FileSelector> | <CSVFileSelector> |
<CSVDataSelector>
<PeopleResourceNameEntity> ::=
<PeopleResourceNameList> | <FileSelector> | <CSVFileSelector> |
<CSVDataSelector>
<ProjectIDEntity> ::=
current | gam | <ProjectID> | (filter <String>) |
(select <ProjectIDList> | <FileSelector> | <CSVFileSelector>)
<PrinterIDEntity> ::=
<PrinterIDList> | <FileSelector> | <CSVFileSelector>
<RecipientEntity> ::=
<EmailAddressEntity> | (select <UserTypeEntity>)
<ResourceEntity> ::=
<ResourceIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector>
<SchemaEntity> ::=
<SchemaNameList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector>
<SharedDriveIDEntity> ::=
<DriveFileItem> |
(teamdriveid <DriveFileItem>) | (teamdriveid:<DriveFileItem>)
<SharedDriveNameEntity> ::=
(teamdrive <SharedDriveName>) | (teamdrive:<SharedDriveName>)
<SharedDriveEntity> ::=
<SharedDriveIDEntity> |
<SharedDriveNameEntity>
<SharedDriveAdminQueryEntity> ::=
(teamdriveadminquery <QueryTeamDrive>) |
(teamdriveadminquery:<QueryTeamDrive>)
<SharedDriveEntityAdmin> ::=
<SharedDriveIDEntity> |
<SharedDriveNameEntity>|
<SharedDriveAdminQueryEntity>
<SharedDriveFileNameEntity> ::=
(teamdrivefilename <DriveFileName>) | (teamdrivefilename:<DriveFileName>)
<SharedDriveFileQueryEntity> ::=
(teamdrivequery <QueryDriveFile>) | (teamdrivequery:<QueryDriveFile>)
<SharedDriveFileQueryShortcut> ::=
all_files | all_folders | all_google_files | all_non_google_files |
all_items
<SiteACLScopeEntity> ::=
<SiteACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector>
| <CSVDataSelector>
<SiteEntity> ::=
<SiteList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<TasklistIDEntity> ::=
<TasklistIDList> | <FileSelector> | <CSVFileSelector>
<TasklistIDTaskIDEntity> ::=
<TasklistIDTaskIDList> | <FileSelector> | <CSVFileSelector>
<ThreadIDEntity> ::=
<ThreadIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>
<UserEntity> ::=
<UserList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVDataSelector>

# Meta Commands

## Select a section from gam.cfg and process a GAM command using values from that
section
<Select> ::=
select <Section> [save] [verify]
save
Set section = <Section> in the [DEFAULT] section and write configuration data
to gam.cfg
verify
Print the variable values for the selected section
Values are determined in this order: Selected section, DEFAULT section, Program
default

## Display all of the sections in gam.cfg and mark the currently selected section
with a *.
showsections

## Select an output filter section from gam.cfg and process a GAM command using
values from that section
The only <VariableName>s recognized in this <Section> are:
csv_output_header_filter, csv_output_header_drop_filter,
csv_output_row_filter and csv_output_row_drop_filter.
<SelectOutputFilter> ::=
selectfilter|selectoutputfilter <Section>

## Select an input filter section from gam.cfg and process a GAM command using
values from that section
The only <VariableName>s recognized in this <Section> are: csv_input_row_filter and
csv_input_row_drop_filter.
<SelectInputFilter> ::=
selectinputfilter <Section>

## Set variables in gam.cfg.

<Config> ::=
config (<VariableName> [=] <Value>)* [save] [verify]
<VariableName> [=] <Value>
Set <VariableName> = <Value> in the current section
All <VariableNames> except section are allowed.
The = is optional but must be surrounded by spaces if included.
save
Write configuration data to gam.cfg
verify
Print the variable values for the current section
Values are determined in this order: Current section, DEFAULT section, Program
default

## Terminate processing of a CSV or batch file when one of the subprocesses returns
a matching return code.
```
<Operator> ::= <|<=|>=|>|=|!=

<ReturnCodeSelection> ::=
rc<Operator><Number>|
rcrange=<Number>/<Number>|
rcrange!=<Number>/<Number>
```

<MultiProcessExit> :=
multiprocessexit <ReturnCodeSelection>
```

## File Redirection

If the pattern {{Section}} appears in <FileName>, it will be replaced with the name
of the current section.
For redirect csv, the optional arguments must appear in the order shown.
<Redirect> ::=
redirect csv <FileName> [multiprocess] [append] [noheader] [charset
<Charset>]
[columndelimiter <Character>] [quotechar <Character>]
[timestampcolumn <String>]
[todrive <ToDriveAttribute>*] |
redirect stdout <FileName> [multiprocess] [append] |
redirect stdout null [multiprocess] |
redirect stderr <FileName> [multiprocess] [append] |
redirect stderr null [multiprocess] |
redirect stderr stdout [multiprocess]

<Select> <SelectInputFilter> <SelectOutputFilter> <Config> <Redirect> must come


before all other arguments and in this order, ... indicates that additional GAM
arguments may appear.

gam [<Select>] [<SelectFInputFilter>] [<SelectOutputilter>] [<Config>] [<Redirect>]


...

<Select> <SelectInputFilter> <SelectOutputFilter> <Config> <Redirect>] will not be


shown in the following command descriptions but can be used with any Gam command.
# Check connection to Google
gam checkconnection

# Version and Help

gam version [check|checkrc|simple|extended] [timeoffset] [location <HostName>]


gam help

# Bulk Processing

gam batch <FileName>|-|(gdoc <UserGoogleDoc>) [charset <Charset>] [showcmds


[<Boolean>]]
gam csv <FileName>|-|(gsheet <UserGoogleSheet>)|(gdoc <UserGoogleDoc>) [charset
<Charset>] [warnifnodata]
[columndelimiter <Character>] [quotechar <Character>] [fields
<FieldNameList>]
(matchfield|skipfield <FieldName> <RegularExpression>)* [showcmds
[<Boolean>]]
[maxrows <Integer>]
gam <GAMArgumentList>
gam tbatch <FileName>|-|(gdoc <UserGoogleDoc>) [charset <Charset>] [showcmds
[<Boolean>]]

gam loop <FileName>|-|(gsheet <UserGoogleSheet>)|(gdoc <UserGoogleDoc>) [charset


<Charset>] [warnifnodata]
[columndelimiter <Character>] [quotechar <Character>] [fields
<FieldNameList>]
(matchfield|skipfield <FieldName> <RegularExpression>)* [showcmds
[<Boolean>]]
[maxrows <Integer>]
gam <GAMArgumentList>

You can make substitutions in <GAMArgumentList> with values from the CSV file.
An argument containing exactly ~xxx is replaced by the value of field xxx from the
CSV file
An argument containing instances of ~~xxx~~ has xxx replaced by the value of field
xxx from the CSV file
An argument containing instances of ~~xxx~!~pattern~!~replacement~~ has ~~...~~
replaced by re.sub(pattern, replacement, value of field xxx from the CSV file)

Example: gam csv Users.csv gam update user "~primaryEmail" address type work
unstructured "~~Street~~, ~~City~~, ~~State~~ ~~ZIP~~" primary note text_plain
"~~primaryEmail~!~^(.+)@(.+)$~!~\1 AT \2~~"
Each user (~primaryEmail, e.g. foo@bar.com) would have their work address updated
and a note that shows their email address as foo AT bar.com

gam list [todrive <ToDriveAttribute>*] <EntityList> [data <CrOSTypeEntity>|


<UserTypeEntity> [delimiter <Character>]]
gam <CrOSTypeEntity>|<UserTypeEntity> list [todrive <ToDriveAttribute>*] [data
<EntityList> [delimiter <Character>]]

# Addresses

gam print addresses [todrive <ToDriveAttribute>*]


[domain <DomainName>]

# Authorization

gam create gcpfolder <String>


gam create gcpfolder [admin <EmailAddress] folder <String>

gam create|add project [<EmailAddress>] [<ProjectID>]


gam create project [admin <EmailAddress>] [project <ProjectID>]
[appname <String>] [supportemail <EmailAddress>]
[projectname <ProjectName>] [parent <String>]
[saname <ServiceAccountName>] [sadisplayname <ServiceAccountDisplayName>]
[sadescription <ServiceAccountDescription>]
gam use project [<EmailAddress>] [<ProjectID>]
gam use project [admin <EmailAddress>] [project <ProjectID>]
[saname <ServiceAccountName>] [sadisplayname <ServiceAccountDisplayName>]
[sadescription <ServiceAccountDescription>]
gam update project [[admin] <EmailAddress>] [<ProjectIDEntity>]
gam delete project [[admin] <EmailAddress>] [<ProjectIDEntity>]
gam show projects [[admin] <EmailAddress>] [all|<ProjectIDEntity>]
[states all|active|deleterequested] [showiampolicies 0|1|3]
gam print projects [[admin] <EmailAddress>] [all|<ProjectIDEntity>] [todrive
<ToDriveAttribute>*]
[states all|active|deleterequested] [showiampolicies 0|1|3
[onememberperrow]]
[delimiter <Character>]] [[formatjson [quotechar <Character>]]
gam info currentprojectid

gam create|add svcacct [[admin] <EmailAddress>] [<ProjectIDEntity>]


[saname <ServiceAccountName>] [sadisplayname <ServiceAccountDisplayName>]
[sadescription <ServiceAccountDescription>]
gam delete svcacct [[admin] <EmailAddress>] [<ProjectIDEntity>]
(saemail <ServiceAccountEmail>)|(saname <ServiceAccountName>)|(sauniqueid
<ServiceAccountUniqueID>)
gam check svcacct <UserTypeEntity> (scope|scopes <APIScopeURLList>)*
gam update svcacct <UserTypeEntity> (scope|scopes <APIScopeURLList>)*
gam show svcaccts [[admin] <EmailAddress>] [all|<ProjectIDEntity>]
[showsakeys all|system|user]
gam print svcaccts [[admin] <EmailAddress>] [all|<ProjectIDEntity>]
[showsakeys all|system|user]
[todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

gam create sakey [(algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)|(localkeysize 1024|


2048|4096)]
gam update sakey [(algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)|(localkeysize 1024|
2048|4096)]
gam replace sakeys [(algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)|(localkeysize
1024|2048|4096)]

These versions of the above three commands are compatible with Basic GAM.
gam rotate sakey|sakeys retain_existing [(algorithm KEY_ALG_RSA_1024|
KEY_ALG_RSA_2048)|(localkeysize 1024|2048|4096)]
gam rotate sakey|sakeys replace_current [(algorithm KEY_ALG_RSA_1024|
KEY_ALG_RSA_2048)|(localkeysize 1024|2048|4096)]
gam rotate sakey|sakeys retain_none [(algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)|
(localkeysize 1024|2048|4096)]

gam delete sakeys <ServiceAccountKeyList>+ [doit]


gam show sakeys [all|system|user]

gam oauth|oauth2 create|request [<EmailAddress>]


gam oauth|oauth2 create|request [admin <EmailAddress>] [scopes <APIScopeURLList>]
gam oauth|oauth2 update [<EmailAddress>]
gam oauth|oauth2 update [admin <EmailAddress>]
gam oauth|oauth2 delete|revoke
gam oauth|oauth2 export [<FileName>]
gam oauth|oauth2 refresh
gam oauth|oauth2 info|verify [showsecret] [accesstoken <AccessToken> idtoken
<IDToken>] [showdetails]

gam <UserTypeEntity> check serviceaccount (scope|scopes <APIScopeURLList>)*


gam <UserTypeEntity> update serviceaccount (scope|scopes <APIScopeURLList>)*

# Administrators

gam print privileges [todrive <ToDriveAttribute>*]


gam show privileges

<RoleAssignmentID> ::= <String>


<RoleItem> ::= id:<String>|uid:<string>|<String>

gam create adminrole <String> privileges all|all_ou|<PrivilegesList> [description


<String>]
gam update adminrole <RoleItem> [name <String>] [privileges all|all_ou|
<PrivilegesList>] [description <String>]
gam delete adminrole <RoleItem>
gam print adminroles|roles [todrive <ToDriveAttribute>*] [privileges]
gam show adminroles|roles [privileges]

gam create|add admin <UserItem> <RoleItem> customer|(org_unit <OrgUnitItem>)


[condition securitygroup|nonsecuritygroup]
gam delete admin <RoleAssignmentId>

gam print admins [todrive <ToDriveAttribute>*] [user <UserItem>] [role <RoleItem>]


[condition]
gam show admins [user <UserItem>] [role <RoleItem>] [condition]

# Alert Center

gam delete alert <AlertID>


gam undelete alert <AlertID>
gam info alert <AlertID> [formatjson]
gam show alerts [filter <QueryAlert>] [orderby createtime [ascending|descending]]
[formatjson]
gam print alerts [todrive <ToDriveAttribute>*] [filter <QueryAlert>] [orderby
createtime [ascending|descending]]
[formatjson [quotechar <Character>]]

gam create alertfeedback <AlertID> not_useful|somewhat_useful|very_useful


gam show alertfeedback [alert <AlertID>] [filter <QueryAlert>] [orderby createtime
[ascending|descending]]
[formatjson]
gam print alertfeedback [todrive <ToDriveAttribute>*] [alert <AlertID>] [filter
<QueryAlert>] [orderby createtime [ascending|descending]]
[formatjson [quotechar <Character>]]

# Aliases

gam create|add alias|aliases <EmailAddressEntity> user|group|target <UniqueID>|


<EmailAddress>
[verifynotinvitable]
gam update alias|aliases <EmailAddressEntity> user|group|target <UniqueID>|
<EmailAddress>
[notargetverify]
gam delete alias|aliases [user|group|target] <EmailAddressEntity>
gam remove aliases|nicknames <EmailAddress> user|group <EmailAddressEntity>
gam <UserTypeEntity> delete alias|aliases

gam info alias|aliases <EmailAddressEntity>

gam print alias|aliases [todrive <ToDriveAttribute>*]


[domain <DomainName>] [(query <QueryUser>)|(queries <QueryUserList>)]
[aliasmatchpattern <RegularExpression>]
[shownoneditable] [nogroups] [nousers]
[onerowpertarget] [suppressnoaliasrows]

gam whatis <EmailItem> [noinfo] [noinivitablecheck]

# Calendars

<CalendarEntity> ::= <CalendarList> | <FileSelector> | <CSVFileSelector> |


<CSVkmdSelector> | <CSVDataSelector>

<CalendarACLRole> ::= editor|freebusy|freebusyreader|owner|reader|writer|none


<CalendarACLScope> ::= <EmailAddress>|user:<EmailAdress>|group:<EmailAddress>|
domain:<DomainName>|domain|default
<CalendarACLScopeList> ::= "<CalendarACLScope>(,<CalendarACLScope>)*"
<CalendarACLScopeEntity> ::= <CalendarACLScopeList> | <FileSelector> |
<CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>

gam calendars <CalendarEntity> create|add acls|calendaracls <CalendarACLRole>


<CalendarACLScopeEntity> [sendnotifications <Boolean>]
gam calendars <CalendarEntity> update acls|calendaracls <CalendarACLRole>
<CalendarACLScopeEntity> [sendnotifications <Boolean>]
gam calendars <CalendarEntity> delete acls|calendaracls [<CalendarACLRole>]
<CalendarACLScopeEntity>
gam calendars <CalendarEntity> info acls|calendaracls <CalendarACLScopeEntity>
[formatjson]

gam calendars <CalendarEntity> show acls|calendaracls [formatjson]


gam calendars <CalendarEntity> print acls|calendaracls [todrive
<ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

gam calendar <CalendarEntity> create|add <CalendarACLRole> ([user] <EmailAddress>)|


(group <EmailAddress>)|(domain [<DomainName>])|default [sendnotifications
<Boolean>]
gam calendar <CalendarEntity> update <CalendarACLRole> ([user] <EmailAddress>)|
(group <EmailAddress>)|(domain [<DomainName>])|default [sendnotifications
<Boolean>]
gam calendar <CalendarEntity> delete [<CalendarACLRole>] ([user] <EmailAddress>)|
(group <EmailAddress>)|(domain [<DomainName>])|default
gam calendar <CalendarEntity> showacl [formatjson]
gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

<AttendeeAttendance> ::= optional|required


<AttendeeStatus> ::= accepted|declined|needsaction|tentative

<EventSelectProperty> ::=
(after|starttime|timemin <Time>)|
(before|endtime|timemax <Time>)|
(query <QueryCalendar>)|
(privateextendedproperty <String>)|
(sharedextendedproperty <Syting>)|
showdeletedevents|
showhiddeninvitations|
singleevents|
(updatedmin <Time>)

<EventMatchProperty> ::=
(matchfield attendees <EmailAddressEntity>)|
(matchfield attendeespattern <RegularExpression>)|
(matchfield attendeesstatus [<AttendeeAttendance>] [<AttendeeStatus>]
<EmailAddressEntity>)|
(matchfield creatoremail <RegularExpression>)|
(matchfield creatorname <RegularExpression>)|
(matchfield description <RegularExpression>)|
(matchfield location <RegularExpression>)|
(matchfield organizeremail <RegularExpression>)|
(matchfield organizername <RegularExpression>)|
(matchfield status <RegularExpression>)|
(matchfield summary <RegularExpression>)|
(matchfield transparency <RegularExpression>)|
(matchfield visibility <RegularExpression>)

<EventIDEntity> ::=
(id|eventid <EventId>) |
(event|events <EventIdList> |
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVSubkeySelector>
| <CSVDataSelector>)

<EventSelectEntity> ::=
(<EventSelectProperty>+ <EventMatchProperty>*)

<EventEntity> ::=
<EventIDEntity> | <EventSelectEntity>

<AttendeeAttendance> ::= optional|required


<AttendeeStatus> ::= accepted|declined|needsaction|tentative

<EventAttribute> ::=
(anyonecanaddself [<Boolean>])|
(attachment <String> <URL>)|
(attendee <EmailAddress>)|
(attendeestatus [<AttendeeAttendance>] [<AttendeeStatus>] <EmailAddress>)|
available|
(colorindex|colorid <EventColorIndex>))|
(description <String>)|
(end (allday <Date>)|<Time>)|
(guestscaninviteothers <Boolean>)|
guestscantinviteothers|
(guestscanmodify <Boolean>)|
(guestscanseeotherguests <Boolean>)|
guestscantseeotherguests|
hangoutsmeet|
(json [charset <Charset>] <JSONData>)|
(json file <FileName> [charset <Charset>])|
(jsonattendees [charset <Charset>] <JSONData>)|(jsonattendees file
<FileName> [charset <Charset>])|
(location <String>)|
(noreminders|(reminder email|popup <Number>))|
(optionalattendee <EmailAddress>)|
(originalstart|originalstarttime (allday <Date>)|<Time>)|
(privateproperty <PropertyKey> <PropertyValue>)|
(recurrence <RRULE, EXRULE, RDATE and EXDATE line>)|
(reminder <Number> email|popup))|
(selectattendees [<AttendeeAttendance>] [<AttendeeStatus>]
<UserTypeEntity>)|
(sequence <Integer>)|
(sharedproperty <PropertyKey> <PropertyValue>)|
(source <String> <URL>)|
(start (allday <Date>)|<Time>)|
(status confirmed|tentative|cancelled)|
(summary <String>)|
tentative|
(timezone <TimeZone>)|
(transparency opaque|transparent)|
(visibility default|public|private)

The following attributes are equivalent:


available - transparency transparent
guestscantinviteothers - guestscaninviteothers False
guestscantseeothers - guestscanseeotherguests False
tentative - status tentative

<EventImportAttribute> ::=
<EventAttribute>|
(organizername <String>)|
(organizeremail <EmailAddress>)

<EventUpdateAttribute> ::=
<EventAttribute>|
clearattachments|
clearattendees|
clearhangoutsmeet|
(clearprivateproperty <PropertyKey>)|
(clearsharedproperty <PropertyKey>)|
(removeattendee <EmailAddress>)|
(replacedescription <RegularExpression> <String>)|
(selectremoveattendees <UserTypeEntity>)

<EventNotificationAttribute> ::=
notifyattendees|(sendnotifications <Boolean>)|(sendupdates all|
enternalonly|none)

The following attributes are equivalent:


notifyattendees - sendupdates all
sendnotifications false - sendupdates none
sendnotifications true - sendupdates all

gam calendar|calendars <CalendarEntity> create|add event [id <String>]


<EventAttribute>+ [<EventNotificationAttribute>]
gam calendar|calendars <CalendarEntity> import event icaluid <iCalUID>
<EventImportAttribute>+
gam calendar|calendars <CalendarEntity> update events [<EventEntity>] [replacemode]
<EventUpdateAttribute>+ [<EventNotificationAttribute>]
gam calendar|calendars <CalendarEntity> delete events [<EventEntity>] [doit]
[<EventNotificationAttribute>]
gam calendar|calendars <CalendarEntity> purge events [<EventEntity>] [doit]
[<EventNotificationAttribute>]
gam calendar|calendars <CalendarEntity> wipe events
gam calendar|calendars <CalendarEntity> move events [<EventEntity>] destination|to
<CalendarItem> [<EventNotificationAttribute>]
gam calendar|calendars <CalendarEntity> empty calendartrash

<EventAttachmentsSubfieldName> ::=
attachments.fileid|
attachments.fileurl|
attachments.iconlink|
attachments.mimetype|
attachments.title

<EventAttendeesSubfieldName> ::=
attendees.additionalguests|
attendees.comment|
attendees.displayname|
attendees.email|
attendees.id|
attendees.optional|
attendees.organizer|
attendees.resource|
attendees.responseStatus|
attendees.self

<EventConferenceDataSubfieldName> ::=
conferencedata.conferenceid|
conferencedata.conferencesolution|
conferencedata.createrequest|
conferencedata.entrypoints|
conferencedata.notes|
conferencedata.signature

<EventCreatorSubfieldName> ::=
creator.displayname|
creator.email|
creator.id|
creator.self

<EventOrganizerSubfieldName> ::=
organizer.displayname|
organizer.email|
organizer.id|
organizer.self

<EventFieldName> ::=
anyonecanaddself|
attachments|
<EventAttachmentsSubfieldName>|
attendees|
<EventAttendeesSubfieldName>|
attendeesomitted|
colorid|
conferencedata|
<EventConferenceDataSubfieldName>|
created|
creator|
<EventCreatorSubfieldName>|
description|
end|endtime|
endtimeunspecified|
extendedproperties|
eventType|
gadget|
guestscaninviteothers|
guestscanmodify|
guestscanseeotherguests|
hangoutlink|
htmllink|
icaluid|
id|
location|
locked|
organizer|
<EventOrganizerSubfieldName>|
originalstart|originalstarttime|
privatecopy|
recurrence|
recurringeventid|
reminders|
sequence|
source|
start|starttime|
status|
summary|
transparency|
updated|
visibility
<EventFieldNameList> ::= "<EventFieldName>(,<EventFieldName>)*"

<EventDisplayProperty> ::=
(alwaysincludeemail)|
(icaluid <String>)|
(maxattendees <Integer>)|
(orderby starttime|updated)|
(timezone <TimeZone>)

gam calendar|calendars <CalendarEntity> info events [<EventEntity>] [maxinstances


<Number>]
[fields <EventFieldNameList>] [showdayofweek]
[formatjson]
gam calendar|calendars <CalendarEntity> show events [<EventSelectEntity>]
<EventDisplayProperty>*
[fields <EventFieldNameList>] [showdayofweek]
[countsonly]
[formatjson]
gam calendar|calendars <CalendarEntity> print events [<EventSelectEntity>]
<EventDisplayProperty>*
[fields <EventFieldNameList>] [showdayofweek]
[countsonly]
[formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]

gam calendar <CalendarEntity> addevent <EventAttribute>+


[<EventNotificationAttribute>]
gam calendar <CalendarEntity> deleteevent (id|eventid <EventID>)+ [doit]
[<EventNotificationAttribute>]
gam calendar <CalendarEntity> moveevent (id|eventid <EventID>)+ destination
<CalendarItem> [<EventNotificationAttribute>]
gam calendar <CalendarEntity> updateevent <EventID> [replacemode]
<EventUpdateAttribute>+ [<EventNotificationAttribute>]
gam calendar <CalendarEntity> wipe
gam calendar <CalendarEntity> printevents <EventSelectProperty>*
<EventDisplayProperty>* [fields <EventFieldNameList>]
[countsonly]
[formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]

<CalendarSettings> ::=
(description <String>)|
(location <String>)|
(summary <String>)|
(timezone <TimeZone>)

gam calendar|calendars <CalendarEntity> show settings [formatjson]


gam calendar|calendars <CalendarEntity> print settings [todrive
<ToDriveAttribute>*]
[formatjson [quotechar <Character>]]
gam calendar|calendars <CalendarEntity> modify <CalendarSettings>+

# Chrome Browser Cloud Management

<QueryBrowser> ::= <String> See:


https://support.google.com/chrome/a/answer/9681204#retrieve_all_chrome_devices_for_
an_account
<QueryBrowserList> ::= "<QueryBrowser>(,<QueryBrowser>)*"

<BrowserEntity> ::=
<DeviceIDList> |
(query:<QueryBrowser>)|(query:orgunitpath:<OrgUnitPath>)|(query
<QueryBrowser>) |
(browserou <OrgUnitItem>) | (browserous <OrgUnitList>) |
<FileSelector> | <CSVFileSelector>

<BrowserAttribute> ::=
(annotatedassetid|asset|assetid <String>)|
(annotatedlocation|location <String>)|
(annotatednotes|notes <String>)|(updatenotes <String>)|
(annotateduser|user <String>

<BrowserFieldName> ::=
annotatedassetid|asset|assetid|
annotatedlocation|location|
annotatednotes|notes|
annotateduser|user|
browsers|
browserversions|
deviceid|
extensioncount|
installedbrowserversion|
lastactivitytime|
lastdeviceuser|
lastdeviceusers|
lastpolicyfetchtime|
lastregistrationtime|
laststatusreporttime|
machineextensionpolicies|
machinename|
machinepolicies|
orgunitpath|org|orgunit|
osarchitecture|
osplatform|
osplatformversion|
osversion|
ou|
policycount|
safebrowsingclickthroughcount|
serialnumber|
virtualdeviceid
<BrowserFieldNameList> ::= "<BrowseFieldName>(,<BrowserFieldName>)*"

<BrowserOrderByFieldName> ::=
annotatedassetid|assetassetid|
annotatedlocation|location|
annotatednotes|notes|
annotateduser|user|
browserversionchannel|
browserversionsortable|
deviceid|id|
enrollmentdate|
extensioncount|
lastactivity|
lastsignedinuser|
lastsync|
machinename|
orgunit|ou|org|
osversion|
osversionsortable|
platformmajorversion|
policycount

gam delete browser <DeviceID>


gam update browser <BrowserEntity> <BrowserAttibute>+
gam move browsers ou|org|orgunit <OrgUnitPath>
((ids <DeviceIDList>) |
(queries <QueryBrowserList> [querytime.* <Time>]) |
(browserou <OrgUnitItem>) | (browserous <OrgUnitList>) |
<FileSelector> | <CSVFileSelector>)
[batchsize <Integer>]

gam info browser <DeviceID>


[basic|full|annotated] <BrowserFieldName>* [fields <BrowserFieldNameList>]
[formatjson]
gam show browsers
([ou|org|orgunit|browserou <OrgUnitPath>] [(query <QueryBrowser>)|(queries
<QueryBrowserList>))|(select <BrowserEntity>))
[querytime.* <Time>]
[orderby <BrowserOrderByFieldName> [ascending|descending]]
[basic|full|allfields|annotated] <BrowserFieldName>* [fields
<BrowserFieldNameList>]
[formatjson]
gam print browsers [todrive <ToDriveAttribute>*]
([ou|org|orgunit|browserou <OrgUnitPath>] [(query <QueryBrowser>)|(queries
<QueryBrowserList>))|(select <BrowserEntity>))
[querytime.* <Time>]
[orderby <BrowserOrderByFieldName> [ascending|descending]]
[basic|full|allfields|annotated] <BrowserFieldName>* [fields
<BrowserFieldNameList>]
[sortheaders]
[formatjson [quotechar <Character>]]

gam create browsertoken


[ou|org|orgunit|browserou <OrgUnitPath>] [expire|expires <Time>]
[formatjson]
gam revoke browsertoken <BrowserTokenPermanentID>

<BrowserTokenFieldName> ::=
createtime|
creatorid|
customerid|
expiretime|
org|
orgunit|
orgunitpath|
revoketime|
revokerid|
state|
token|
tokenpermanentid
<BrowserTokenFieldNameList> ::= "<BrowseTokenFieldName>(,<BrowserTokenFieldName>)*"

gam show browsertokens


([ou|org|orgunit|browserou <OrgUnitPath>] [(query <QueryBrowserToken)|
(queries <QueryBrowserTokenList>)))
[querytime.* <Time>]
[orderby <BrowserTokenFieldName> [ascending|descending]]
[allfields] <BrowserTokenFieldName>* [fields <BrowserTokenFieldNameList>]
[formatjson]
gam print browsertokens [todrive <ToDriveAttribute>*]
([ou|org|orgunit|browserou <OrgUnitPath>] [(query <QueryBrowserToken)|
(queries <QueryBrowserTokenList>)))
[querytime.* <Time>]
[orderby <BrowserTokenFieldName> [ascending|descending]]
[allfields] <BrowserTokenFieldName>* [fields <BrowserTokenFieldNameList>]
[sortheaders]
[formatjson [quotechar <Character>]]

# Chat

gam setup chat

gam create chatspace


[displayname <String>]
[type chat|group_chat|direct_message|dm]
[notification always|less_with_new_threads|less|never}
[formatjson]

gam info chatspace space <ChatSpace>


[formatjson]
gam show chatspaces
[formatjson]
gam print chatspaces [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

gam create chatmember space <ChatSpace> user <UserItem>


[type human|bot]
[notification always|less_with_new_threads|less|never}
[formatjson]

gam info chatmember member <ChatMember>


[formatjson]
gam show chatmembers space <ChatSpace>
[formatjson]
gam print chatmembers [todrive <ToDriveAttribute>*] space <ChatSpace>
[formatjson [quotechar <Character>]]

gam create chatmessage space <ChatSpace> [thread <ChatThread>]


(text <String>)|(textfile <FileName> [charset <CharSet>])
gam update chatmessage name <ChatMessage>
(text <String>)|(textfile <FileName> [charset <CharSet>])
gam delete chatmessage name <ChatMessage>

gam info chatmessage name <ChatMessage>


[formatjson]

# Chrome Installed Apps Counts

gam show chromeapps


[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[filter <String>]
[orderby appname|apptype|installtype|numberofpermissions|totalinstallcount]
[formatjson]
gam print chromeapps [todrive <ToDriveAttribute>*]
[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[filter <String>]
[orderby appname|apptype|installtype|numberofpermissions|totalinstallcount]
[formatjson [quotechar <Character>]] [delimiter <Character>]

gam show chromeappdevices


appid <AppID> apptype extension|app|theme|hostedapp|androidapp
[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[start <Date>] [end <Date>]
[orderby deviceid|machine]
[formatjson]
gam print chromeappdevices [todrive <ToDriveAttribute>*]
appid <AppID> apptype extension|app|theme|hostedapp|androidapp
[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[start <Date>] [end <Date>]
[orderby deviceid|machine]
[formatjson [quotechar <Character>]]

# Chrome Versions Counts

gam show chromeversions


[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[start <Date>] [end <Date>] [recentfirst [<Boolean>]]
[formatjson]
gam print chromeversions [todrive <ToDriveAttribute>*]
[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[start <Date>] [end <Date>]
[recentfirst [<Boolean>]]
[formatjson [quotechar <Character>]]

# Chrome Version History

<ChromePlatfornType> ::=
all|
android|
ios|
lacros|
linux|
mac|
macarm64|
sebview|
win|
win64
<ChromeChannelType> :==
beta|
canary|
canaryasan|
dev|
stable
<ChromeVersionsOrderByFieldName> ::=
channel|
name|
platform|
version|
<ChromeReleasesOrderByFieldName> ::=
channel|
endtime|
fraction|
name|
platform|
starttime|
version

gam show chromehistory platforms


[formatjson]
gam print chromehistory platforms [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

gam show chromehistory channels


[platform <ChromePlatformType>]
[formatjson]
gam print chromehistory channels [todrive <ToDriveAttribute>*]
[platform <ChromePlatformType>]
[formatjson [quotechar <Character>]]

gam show chromehistory versions


[platform <ChromePlatformType>] [channel <ChromeChannelType>]
[filter <String>]
(orderby <ChromeVersionsOrderByFieldName> [ascending|descending])*
[formatjson]
gam print chromehistory versions [todrive <ToDriveAttribute>*]
[platform <ChromePlatformType>] [channel <ChromeChannelType>]
[filter <String>]
(orderby <ChromeVersionsOrderByFieldName> [ascending|descending])*
[formatjson [quotechar <Character>]]
gam show chromehistory releases
[platform <ChromePlatformType>] [channel <ChromeChannelType>] [version
<String>]
[filter <String>]
(orderby <ChromeReleasessOrderByFieldName> [ascending|descending])*
[formatjson]
gam print chromehistory releases [todrive <ToDriveAttribute>*]
[platform <ChromePlatformType>] [channel <ChromeChannelType>] [version
<String>]
[filter <String>]
(orderby <ChromeReleasessOrderByFieldName> [ascending|descending])*
[formatjson [quotechar <Character>]]

# ChromeOS Devices

<CrOSAction> ::=
deprovision_different_model_replace|
deprovision_retiring_device|
deprovision_same_model_replace|
deprovision_upgrade_transfer|
disable|
reenable|
pre_provisioned_disable|
pre_provisioned_reenable

gam update cros <CrOSEntity> action <CrOSAction>


[acknowledge_device_touch_requirement]
gam <CrOSTypeEntity> update action <CrOSAction>
[acknowledge_device_touch_requirement]

<CrOSCommand>
reboot|
remote_powerwash|
set_volume <0-100>|
wipe_users|
take_a_screenshot

gam issuecommand cros <CrOSEntity> command <CrOSCommand> [times_to_check_status


<Integer>] [doit]
gam <CrOSTypeEntity> issuecommand command <CrOSCommand> [times_to_check_status
<Integer>] [doit]
gam getcommand cros <CrOSEntity> commandid <CommandID> [times_to_check_status
<Integer>]
gam <CrOSTypeEntity> getcommand commandid <CommandID> [times_to_check_status
<Integer>]

<CrOSAttribute> ::=
(asset|assetid|tag <String>)|
(location <String>)|
(notes <String>)|(updatenotes <String>)|
(org|ou <OrgUnitPath>)|
(user <String>)

gam update cros <CrOSEntity> <CrOSAttribute>+ [quickcrosmove [<Boolean>]]


[nobatchupdate]
gam <CrOSTypeEntity> update <CrOSAttribute>+ [quickcrosmove [<Boolean>]]
[nobatchupdate]

<CrOSFieldName> ::=
activetimeranges|timeranges|
annotatedassetid|assetid|asset|
annotatedlocation|location|
annotateduser|user|
autoupdateexpiration|
bootmode|
cpustatusreports|
devicefiles|
deviceid|
diskvolumereports|
dockmacaddress|
ethernetmacaddress|
ethernetmacaddress0|
firmwareversion|
lastenrollmenttime|
lastknownnetwork|
lastsync|
macaddress|
manufacturedate|
meid|
model|
notes|
ordernumber|
orgunitid|
orgunitpath|org|ou|
osversion|
platformversion|
recentusers|
serialnumber|
status|
supportenddate|
systemramtotal|
systemramfreereports|
tpmversioninfo|
willautorenew
<CrOSFieldNameList> ::= "<CrOSFieldName>(,<CrOSFieldName>)*"

<CrOSListFieldName> ::=
activetimeranges|timeranges|times|
cpustatusreports|
devicefiles|files|
diskvolumereports|
lastknownnetwork|
recentusers|users|
systemramfreereports
<CrOSListFieldNameList> ::= "<CrOSListFieldName>(,<CrOSListFieldName>)*"

<CrOSOrderByFieldName> ::=
lastsync|location|notes|serialnumber|status|supportenddate|user

gam info cros <CrOSEntity>


[basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>]
[nolists]
[start <Date>] [end <Date>] [listlimit <Number>]
[reverselists <CrOSListFieldNameList>]
[timerangeorder ascending|descending] [showdvrsfp]
[downloadfile latest|<Time>] [targetfolder <FilePath>]
[formatjson]
gam <CrOSTypeEntity> info
[basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>]
[nolists]
[start <Date>] [end <Date>] [listlimit <Number>]
[reverselists <CrOSListFieldNameList>]
[timerangeorder ascending|descending] [showdvrsfp]
[downloadfile latest|<Time>] [targetfolder <FilePath>]
[formatjson]

Print fields for selected CrOS devices; use these options to select CrOS devices:
[(query <QueryCrOS>)|(queries <QueryCrOSList>) [querytime.* <Time>]
[(limittoou|cros_ou <OrgUnitItem>)|(cros_ou_and_children <OrgUnitItem>)|
(cros_ous <OrgUnitList>)|(cros_ous_and_children <OrgUnitList>)]]
If none of these options are chosen, all CrOS devices are selected.

gam print cros [todrive <ToDriveAttribute>*]


[(query <QueryCrOS>)|(queries <QueryCrOSList>) [querytime.* <Time>]
[(limittoou|cros_ou <OrgUnitItem>)|(cros_ou_and_children <OrgUnitItem>)|
(cros_ous <OrgUnitList>)|(cros_ous_and_children <OrgUnitList>)]]
[orderby <CrOSOrderByFieldName> [ascending|descending]]
[basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>]
[nolists|(<CrOSListFieldName>* [onerow])]
[start <Date>] [end <Date>] [listlimit <Number>]
[reverselists <CrOSListFieldNameList>]
[timerangeorder ascending|descending] [showdvrsfp]
[sortheaders]
[formatjson [quotechar <Character>]]

Print fields for specified CrOS devices.

gam print cros [todrive <ToDriveAttribute>*] select <CrOSTypeEntity>


[orderby <CrOSOrderByFieldName> [ascending|descending]]
[basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>]
[nolists|(<CrOSListFieldName>* [onerow])
[start <Date>] [end <Date>] [listlimit <Number>]
[reverselists <CrOSListFieldNameList>]
[timerangeorder ascending|descending] [showdvrsfp]
[sortheaders]
[formatjson [quotechar <Character>]]

gam <CrOSTypeEntity> print cros [todrive <ToDriveAttribute>*]


[orderby <CrOSOrderByFieldName> [ascending|descending]]
[basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>]
[nolists|(<CrOSListFieldName>* [onerow])]
[start <Date>] [end <Date>] [listlimit <Number>]
[reverselists <CrOSListFieldNameList>]
[timerangeorder ascending|descending] [showdvrsfp]
[sortheaders]
[formatjson [quotechar <Character>]]

The first column will always be deviceId; the remaining field names will be sorted
if allfields, basic, full or sortheaders is specified;
otherwise, the remaining field names will appear in the order specified.

The basic argument outputs these column headers:


deviceId,annotatedAssetId,annotatedLocation,annotatedUser,lastSync,notes,serialNumb
er,status.
The allfields/full arguments output all column headers including seven headers:
activeTimeRanges, cpuStatusReports, deviceFiles, diskVolumeReports,
lastknownnetwork, recentUsers and systemRamFreeReports that repeat with multiple
subvalues each, yielding a large number of columns that make the output hard to
process.
The nolists argument suppresses these six headers; if you want these headers in a
more manageable form specify <CrOSListFieldName> values as desired.
One set of values for all <CrOSListFieldName> fields specified will be output on a
separate row with all of the other headers.

The listlimit <Number> argument limits the number of repetitions to <Number>; if


not specified or <Number> equals zero, there is no limit.
The start <Date> and end <Date> arguments constrain activeTimeRanges,
cpuStatusReports, deviceFiles and systemRamFreeReports to fall within the specified
<Dates>.

Print no header row and deviceId for specified CrOS devices.

gam <CrOSTypeEntity> print


gam <CrOSTypeEntity> print cros

Print activity for selected CrOS devices; use these options to select CrOS devices:
[(query <QueryCrOS>)|(queries <QueryCrOSList>) [querytime.* <Time>]
[(limittoou|cros_ou <OrgUnitItem>)|(cros_ou_and_children <OrgUnitItem>)|
(cros_ous <OrgUnitList>)|(cros_ous_and_children <OrgUnitList>)]]
If none of these options are chosen, all CrOS devices are selected.

gam print crosactivity [todrive <ToDriveAttribute>*]


[(query <QueryCrOS>)|(queries <QueryCrOSList>) [querytime.* <Time>]
[(limittoou|cros_ou <OrgUnitItem>)|(cros_ou_and_children <OrgUnitItem>)|
(cros_ous <OrgUnitList>)|(cros_ous_and_children <OrgUnitList>)]]
[orderby <CrOSOrderByFieldName> [ascending|descending]]
[recentusers] [timeranges] [both] [devicefiles] [all] [oneuserperrow]
[start <Date>] [end <Date>]
[listlimit <Number>] [timerangeorder ascending|descending]
[delimiter <Character>]
[formatjson [quotechar <Character>]]

Print activity for specified CrOS devices.

<CrOSActivityListFieldName> ::=
activetimeranges|timeranges|times|
devicefiles|files|
recentusers|users
<CrOSActivityListFieldNameList> ::=
"<CrOSActivityListFieldName>(,<CrOSActivityListFieldName>)*"

gam print crosactivity [todrive <ToDriveAttribute>*] select <CrOSTypeEntity>


[orderby <CrOSOrderByFieldName> [ascending|descending]]
[recentusers] [timeranges] [both] [devicefiles] [all] [oneuserperrow]
[start <Date>] [end <Date>] [listlimit <Number>]
[reverselists <CrOSActivityListFieldNameList>]
[timerangeorder ascending|descending]
[delimiter <Character>]
[formatjson [quotechar <Character>]]

gam <CrOSTypeEntity> print crosactivity [todrive <ToDriveAttribute>*]


[orderby <CrOSOrderByFieldName> [ascending|descending]]
[recentusers] [timeranges] [both] [devicefiles] [all] [oneuserperrow]
[start <Date>] [end <Date>] [listlimit <Number>]
[reverselists <CrOSActivityListFieldNameList>]
[timerangeorder ascending|descending]
[delimiter <Character>]
[formatjson [quotechar <Character>]]

The basic column headers are:


deviceId,annotatedAssetId,annotatedLocation,serialNumber,orgUnitPath.

If recentusers is specified, all of the recent users email addresses, separated by


the delimiter <Character>,
with header recentUsers.email, are output with the basic headers. If oneuserperrow
is specified, each recent user
is output on a separate row with the basic headers.

If timeranges is specified, for each time range entry, activeTimeRanges.date,


activeTimeRanges.duration and activeTimeRanges.minutes
are output on a separate row with the basic headers.

If devicefiles is specified, for each deviceFile, deviceFiles.type and


deviceFiles.createTime
are output on a separate row with the basic headers.

The both option specifies recentusers and timeranges.


The all option specifies recentusers, timeranges and devicefiles.
The default is to include recentusers and timeranges.

The listlimit <Number> argument limits the number of recent users, time ranges and
device files to <Number>; if not specified or <Number> equals zero, there is no
limit.
The start <Date> and end <Date> arguments filter the time ranges and device files.
Delimiter defaults to gam.cfg/csv_output_field_delimiter.

gam get devicefile <CrOSEntity> [select <DeviceFileEntity>] [targetfolder


<FilePath>]
gam <CrOSTypeEntity> get devicefile [select <DeviceFileEntity>] [targetfolder
<FilePath>]

Print telemetry data for specified CrOS devices.

<CrOSTelemetryFieldName> ::=
batteryinfo|
batterystatusreport|
cpuinfo|
cpustatusreport|
customer|
deviceid|
graphicsinfo|
graphicsstatusreport|
memoryinfo|
memorystatusreport|
name|
networkstatusreport|
orgunitid|
osupdatestatus|
serialnumber|
storageinfo|
storagestatusreport
<CrOSTelemetryFieldNameList> ::=
"<CrOSTelemetryFieldName>(,<CrOSTelemetryFieldName>)*"
CrOSTelemetryListFieldName> ::=
batterystatusreport|
cpustatusreport|
graphicsstatusreport|
memorystatusreport|
networkstatusreport|
storagestatusreport
<CrOSTelemetryListFieldNameList> ::=
"<CrOSTelemetryListFieldName>(,<CrOSTelemetryLIstFieldName>)*"

gam info crostelemetry <SerialNumber>


<CrOSTelemetryFieldName>* [fields <CrOSTelemetryFieldNameList>]
[start <Date>] [end <Date>] [listlimit <Number>]
[reverselists <CrOSTelemetryListFieldNameList>]
[formatjson]
gam show crostelemetry
[(ou|org|orgunit <OrgUnitItem>)|(cros_sn <SerialNumber>)|(filter <String>)]
<CrOSTelemetryFieldName>* [fields <CrOSTelemetryFieldNameList>]
[start <Date>] [end <Date>] [listlimit <Number>]
[reverselists <CrOSTelemetryListFieldNameList>]
[formatjson]
gam print crostelemetry [todrive <ToDriveAttribute>*]
[(ou|org|orgunit <OrgUnitItem>)|(cros_sn <SerialNumber>)|(filter <String>)]
<CrOSTelemetryFieldName>* [fields <CrOSTelemetryFieldNameList>]
[reverselists <CrOSTelemetryListFieldNameList>]
[start <Date>] [end <Date>] [listlimit <Number>]
[formatjson [quotechar <Character>]]

# Chrome Browser Policies

<ChromePolicyImageSchemaName> ::=
chrome.devices.managedguest.avatar |
chrome.devices.managedguest.wallpaper |
chrome.devices.signinwallpaperimage |
chrome.users.avatar |
chrome.users.wallpaper

gam create chromepolicyimage <ChromePolicyImageSchemaName> <FileName>

gam update chromepolicy


(<SchemaName>
(<Field> <Value>)+ |
(json [charset <Charset>] <JSONData>) |
(json file <FileName> [charset <Charset>])
)+
ou|org|orgunit <OrgUnitItem> [(printerid <PrinterID>)|(appid <AppID>)]
gam delete chromepolicy <SchemaName>+
ou|org|orgunit <OrgUnitItem> [(printerid <PrinterID>)|(appid <AppID>)]
gam show chromepolicies
ou|org|orgunit <OrgUnitItem> [(printerid <PrinterID>)|(appid <AppID>)]
[filter <String>] [namespace <NamespaceList>]
[show all|direct|inherited]
[formatjson]
gam print chromepolicies [todrive <ToDriveAttribute>*]
ou|org|orgunit <OrgUnitItem> [(printerid <PrinterID>)|(appid <AppID>)]
[filter <String>] [namespace <NamespaceList>]
[show all|direct|inherited]
[[formatjson [quotechar <Character>]]
gam info chromeschema <SchemaName>
<ChromePolicySchemaFieldName>* [fields <ChromePolicySchemaFieldNameList>]
[formatjson]
gam show chromeschemas
[filter <String>]
<ChromePolicySchemaFieldName>* [fields <ChromePolicySchemaFieldNameList>]
[formatjson]
gam print chromschemas [todrive <ToDriveAttribute>*]
[filter <String>]
<ChromePolicySchemaFieldName>* [fields <ChromePolicySchemaFieldNameList>]
[[formatjson [quotechar <Character>]]

gam show chromeschemas std


[filter <String>]

# Chrome Apps/Versions

gam show chromeapps


[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[filter <String>]
[orderby appname|apptype|installtype|numberofpermissions|totalinstallcount]
[formatjson]
gam print chromeapps [todrive <ToDriveAttribute>*]
[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[filter <String>]
[orderby appname|apptype|installtype|numberofpermissions|totalinstallcount]
[formatjson [quotechar <Character>]]

gam show chromeappdevices


[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[appid <AppID>] [apptype extension|app|theme|hostedapp|androidapp]
[filter <String>]
[orderby deviceid|machine]
[formatjson]
gam print chromeappdevices [todrive <ToDriveAttribute>*]
[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[appid <AppID>] [apptype extension|app|theme|hostedapp|androidapp]
[filter <String>]
[orderby deviceid|machine]
[formatjson [quotechar <Character>]]

gam show chromeversions


[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[start <Date>] [end <Date>]
[formatjson]
gam print chromeversions [todrive <ToDriveAttribute>*]
[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[start <Date>] [end <Date>]
[formatjson [quotechar <Character>]]

# Context Aware Access

<QueryCEL> ::= <String>


See: https://cloud.google.com/access-context-manager/docs/custom-access-
level-spec

<CAAAllowedEncryptionStatus> ::=
encryption_unsupported |
encrypted |
unencrypted
<CAAAllowedEncryptionStatusList> ::=
"<CAAAllowedEncryptionStatus>(,<CAAAllowedEncryptionStatus>)"

<CAAAllowedDeviceManagementLevel> ::=
basic |
advanced|complete |
none
<CAAAllowedDeviceManagementLevelList> ::=
"<CAAAllowedDeviceManagementLevel>(,<CAAAllowedDeviceManagementLevel>)"

<CAACombiningFunction> ::=
and |
or

<CAAIPSubNetwork> ::=
<CIDRnetmask>
<CAAIPSubNetworkList> ::= "<CAAIPSubNetwork>(,<CAAIPSubNetwork>)"

<CAAMember> ::=
user:<EmailAddress> |
serviceAccount:<EmailAddress>
<CAAMemberList> ::= "<CAAMember>(,<CAAMember>)"

<CAAOsType> ::=
DESKTOP_MAC |
DESKTOP_WINDOWS |
DESKTOP_LINUX |
DESKTOP_CHROME_OS |
VERIFIED_DESKTOP_CHROME_OS |
ANDROID |
IOS

<CAAOsConstraint> ::=
<CAAOsType> |
<CAAOsType>:<String>.<String>.<String>
<CAAOsConstraintList> ::= "<CAAOsConstraint>(,<CAAOsConstraint>)"

<CAARegion> ::=
<Character><Character>
<CAARegionList> ::= "<CAARegion>(,<CAARegion>)"
See: https://github.com/taers232c/GAMADV-XTD3/wiki/Context-Aware-Access-
Levels#caa-region-codes

<CAADevicePolicyAttribute> ::=
(requirescreenlock <Boolean>) |
(allowedencryptionstatuses <CAAAllowedEncryptionStatusList>) |
(osconstraints <CAAOsConstraintList>) |
(alloweddevicemanagementlevels <CAAAllowedDeviceManagementLevelList>) |
(requireadminapproval <Boolean>) |
(requirecorpowned <Boolean>) # See: https://www.iso.org/obp/ui/#search

<CAAConditionAttribute> ::=
(ipsubnetworks <CAAIPSubNetworkList>) |
(devicepolicy <CAADevicePolicyAttribute> enddevicepolicy) |
(requiredaccesslevels <StringList>) |
(negate <Boolean>) |
(members <CAAMemberList>) |
(regions <CAARegionList>)

<CAABasicAttribute> ::+
(combiningfunction <CAACombiningFunction>) |
(condition <CAAConditionAttribute>+ endcondition)

gam create caalevel <String> [description <String>] (basic <CAABasicAttribute>+)|


(custom <QueryCEL>)
gam update caalevel <CAALevelName> [description <String>] (basic
<CAABasicAttribute>+)|(custom <QueryCEL>)
gam delete caalevel <CAALevelName>
gam show caalevels
[formatjson]
gam print caalevels [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

# Cloud Channel

<ChannelCustomerField> ::=
alternateemail |
channelpartnerid |
cloudidentityid |
cloudidentityinfo |
createtime |
domain |
languagecode |
name |
orgdisplayname |
orgpostaladdress |
primarycontactinfo |
updatetime
<ChannelCustomerFieldList> ::= "<ChannelCustomerField>(,<ChannelCustomerField>)*"

gam print channelcustomers [todrive <ToDriveAttribute>*]


[resellerid <ResellerID>] [filter <String>]
[fields <ChannelCustomerFieldList>]
[maxresults <Number>]
[formatjson [quotechar <Character>]]
gam show channelcustomers
[resellerid <ResellerID>] [filter <String>]
[fields <ChannelCustomerFieldList>]
[maxresults <Number>]
[formatjson]

<ChannelCustomerEntitlementField> ::=
associationinfo |
commitmentsettings |
createtime |
name |
offer |
parameters |
provisionedservice |
provisioningstate |
purchaseorderid |
suspensionreasons |
trialsettings |
updatetime
<ChannelCustomerEntitlementFieldList> ::=
"<ChannelCustomerEntitlementField>(,<ChannelCustomerEntitlementField>)*"

gam print channelcustomercentitlements [todrive <ToDriveAttribute>*]


([resellerid <ResellerID>] [customerid <ChannelCustomerID>])
(name accounts/<ResellerID>/customers/<ChannelCustomerID>)
[fields <ChannelCustomerEntitlementsFieldList>]
[maxresults <Number>]
[formatjson [quotechar <Character>]]
gam show channelcustomerentitlements
([resellerid <ResellerID>] [customerid <ChannelCustomerID>])|
(name accounts/<AccountID/customers/<ChannelCustomerID>)
[fields <ChannelCustomerEntitlementsFieldList>]
[maxresults <Number>]
[formatjson]

<ChannelCustomerOfferField> ::=
constraints |
endtime |
marketinginfo |
name |
parameterdefinitions |
plan |
pricebyresources |
sku |
starttime
<ChannelOfferFieldList> ::= "<ChannelOfferField>(,<ChannelOfferField>)*"

gam print channeloffers [todrive <ToDriveAttribute>*]


[resellerid <ResellerID>] [filter <String>] [language <LanguageCode>]
[fields <ChannelOfferFieldList>]
[maxresults <Number>]
[formatjson [quotechar <Character>]]
gam show channeloffers
[resellerid <ResellerID>] [filter <String>] [language <LanguageCode>]
[fields <ChannelOfferFieldList>]
[maxresults <Number>]
[formatjson]

<ChannelProductField> ::=
marketinginfo |
name
<ChannelProductFieldList> ::= "<ChannelProductField>(,<ChannelProductField>)*"

gam print channelproducts [todrive <ToDriveAttribute>*]


[resellerid <ResellerID>] [language <LanguageCode>]
[fields <ChannelProductFieldList>]
[maxresults <Number>]
[formatjson [quotechar <Character>]]
gam show channelproducts
[resellerid <ResellerID>] [language <LanguageCode>]
[fields <ChannelProductFieldList>]
[maxresults <Number>]
[formatjson]

<ChannelSKUField> ::=
marketinginfo |
name |
product
<ChannelSKUFieldList> ::= "<ChannelSKUField>(,<ChannelSKUField>)*"

gam print channelskus [todrive <ToDriveAttribute>*]


[resellerid <ResellerID>] [language <LanguageCode>] [productid <ProductID>]
[fields <ChannelSKUFieldList>]
[maxresults <Number>]
[formatjson [quotechar <Character>]]
gam show channelskus
[resellerid <ResellerID>] [language <LanguageCode>] [productid <ProductID>]
[fields <ChannelSKUFieldList>]
[maxresults <Number>]
[formatjson]

# Contacts - Delegation

gam <UserTypeEntity> create contactdelegate <UserEntity>


gam <UserTypeEntity> delete contactdelegate <UserEntity>
gam <UserTypeEntity> print contactdelegates [todrive <ToDriveAttribute>*]
[shownames]
gam <UserTypeEntity> show contactdelegates [shownames] [csv]

# Classroom - Courses

<CourseAnnouncementState> ::= draft|published|deleted


<CourseAnnouncementStateList> ::=
"<CourseAnnouncementState>(,<CourseAnnouncementState>)*"

<CourseSubmissionState> ::= new|created|turned_in|returned|reclaimed_by_student


<CourseSubmissionStateList> ::=
"<CourseSubmissionState>(,<CourseSubmissionState>)*"

<CourseWorkState> ::= draft|published|deleted


<CourseWorkStateList> ::= "<CourseWorkState>(,<CourseWorkState>)*"

<CourseMaterialState> ::= draft|published|deleted


<CourseMaterialStateList> ::= "<CourseMaterialState>(,<CourseMaterialState>)*"

<CourseAttribute> ::=
(description <String>)|
(descriptionheading|heading <String>)|
(name <String>)|
(room <String>)|
(section <string>)|
(state|status <CourseState>)|
(owner|ownerid|teacher <UserItem>)

<CourseFieldName> ::=
aliases|
alternatelink|
calendarid|
coursegroupemail|
coursematerialsets|
coursestate|
creationtime|
description|
descriptionheading|heading|
enrollmentcode|
gradebooksettings|
guardiansenabled|
id|
name|
owneremail|
ownerid|
room|
section|
students|
teacherfolder|
teachergroupemail|
teachers|
updatetime
<CourseFieldNameList> ::= "<CourseFieldName>(,<CourseFieldName>)*"

gam create|add course [id|alias <CourseAlias>] <CourseAttribute>*


[copyfrom <CourseID>
[announcementstates <CourseAnnouncementStateList>]
[materialstates <CourseMaterialStateList>]
[workstates <CourseWorkStateList>]
[removeduedate [<Boolean>]]
[mapsharemodestudentcopy edit|none|view]
[copymaterialsfiles [<Boolean>]]
[copytopics [<Boolean>]]
[markpublishedasdraft [<Boolean>]]
[members none|all|students|teachers]]
[logdrivefileids [<Boolean>]]
gam update course <CourseID> <CourseAttribute>+
[copyfrom <CourseID>
[announcementstates <CourseAnnouncementStateList>]
[materialstates <CourseMaterialStateList>]
[workstates <CourseWorkStateList>]
[removeduedate [<Boolean>]]
[mapsharemodestudentcopy edit|none|view]
[copymaterialsfiles [<Boolean>]]
[copytopics [<Boolean>]]
[markpublishedasdraft [<Boolean>]]
[members none|all|students|teachers]]
[logdrivefileids [<Boolean>]]
gam delete course <CourseID> [archive|archived]

gam update courses <CourseEntity> <CourseAttribute>+


[copyfrom <CourseID>
[announcementstates <CourseAnnouncementStateList>]
[materialstates <CourseMaterialStateList>]
[workstates <CourseWorkStateList>]
[removeduedate [<Boolean>]]
[mapsharemodestudentcopy edit|none|view]
[copymaterialsfiles [<Boolean>]]
[copytopics [<Boolean>]]
[markpublishedasdraft [<Boolean>]]
[members none|all|students|teachers]]
[logdrivefileids [<Boolean>]]
gam delete courses <CourseEntity> [archive|archived]

gam course <CourseID> create|add alias <CourseAlias>


gam course <CourseID> delete alias <CourseAlias>
gam course <CourseID> create|add topic <CourseTopic>
gam course <CourseID> delete topic <CourseTopicID>

gam course <CourseID> create|add teachers [makefirstteacherowner] <UserItem>


gam course <CourseID> create|add students <UserItem>
gam course <CourseID> delete|remove teachers|students <UserItem>
gam course <CourseID> clear teachers|students
gam course <CourseID> sync teachers [addonly|removeonly] [makefirstteacherowner]
<UserTypeEntity>
gam course <CourseID> sync students [addonly|removeonly] <UserTypeEntity>

gam courses <CourseEntity> create|add alias <CourseAliasEntity>


gam courses <CourseEntity> delete alias <CourseAliasEntity>

gam courses <CourseEntity> create|add topic <CourseTopicEntity>


gam courses <CourseEntity> delete topic <CourseTopicIDEntity>

gam courses <CourseEntity> create|add teachers [makefirstteacherowner]


<UserTypeEntity>
gam courses <CourseEntity> create|add students <UserTypeEntity>
gam courses <CourseEntity> delete|remove teachers|students <UserTypeEntity>
gam courses <CourseEntity> clear teachers|students
gam courses <CourseEntity> sync teachers [addonly|removeonly]
[makefirstteacherowner] <UserTypeEntity>
gam courses <CourseEntity> sync students [addonly|removeonly] <UserTypeEntity>

gam info course <CourseID> [owneremail] [alias|aliases] [show all|students|


teachers] [countsonly]
[fields <CourseFieldNameList>] [skipfields <CourseFieldNameList>]
[formatjson]
gam info courses <CourseEntity> [owneremail] [alias|aliases] [show all|students|
teachers] [countsonly]
[fields <CourseFieldNameList>] [skipfields <CourseFieldNameList>]
[formatjson]
gam print courses [todrive <ToDriveAttribute>*]
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>]
[states <CourseStateList>])
[owneremail] [owneremailmatchpattern <RegularExpression>]
[alias|aliases|aliasesincolumns [delimiter <Character>]]
[show all|students|teachers] [countsonly]
[fields <CourseFieldNameList>] [skipfields <CourseFieldNameList>]
[formatjson [quotechar <Character>]]
[timefilter creationtime|updatetime] [start|starttime <Date>|<Time>] [end|
endtime <Date>|<Time>]
gam print course-participants [todrive <ToDriveAttribute>*]
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>]
[states <CourseStateList>])
[show all|students|teachers]
[formatjson [quotechar <Character>]]

<CourseAnnouncementFieldName> ::=
alternatelink|
assigneemode|
courseid|
courseannouncementid|
creationtime|
creator|creatoruserid|
id|
materials|
scheduledtime|
state|
text|
updatetime
<CourseAnnouncementFieldNameList> ::=
"<CourseAnnouncementFieldName>(,<CourseAnnouncementFieldName>)*"

<CourseAnnouncementOrderByFieldName> ::=
updatetime|
updatedate

<CourseMaterialFieldName> ::=
alternatelink|
assigneemode|
courseid|
courseworkmaterialid|
creationtime|
creator|creatoruserid|
description|
id|
materials|
scheduledtime|
state|
title|
topicid|
updatetime|
workmaterialid
<CourseMaterialFieldNameList> ::=
"<CourseMaterialFieldName>(,<CourseMaterialFieldName>)*"

<CourseMaterialOrderByFieldName> ::=
updatetime|
updatedate

<CourseSubmissionFieldName> ::=
alternatelink|
assignedgrade|
courseid|
courseworkid|
courseworktype|
creationtime|
draftgrade|
id|
late|
state|
submissionhistory|
updatetime|
userid|
worktype
<CourseSubmissionFieldNameList> ::=
"<CourseSubmissionFieldName>(,<CourseSubmissionFieldName>)*"

<CourseWorkFieldName> ::=
alternatelink|
assigneemode|
courseid|
courseworkid|
courseworktype|
creationtime|
creator|creatoruserid|
description|
duedate|
duetime|
id|
materials|
maxpoints|
scheduledtime|
state|
submissionmodificationmode|
title|
topicid|
updatetime|
workid|
worktype
<CourseWorkFieldNameList> ::= "<CourseWorkFieldName>(,<CourseWorkFieldName>)*"

<CourseWorkOrderByFieldName> ::=
duedate|
updatetime|
updatedate

gam print course-announcements [todrive <ToDriveAttribute>*]


(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>]
states <CourseStateList>])
(announcementids <CourseAnnouncementIDEntity>)|((announcementstates
<CourseAnnouncementStateList>)*
(orderby <CourseAnnouncementOrderByFieldName> [ascending|descending])*)
[showcreatoremails|creatoremail] [fields <CourseAnnouncementFieldNameList>]
[formatjson [quotechar <Character>]]
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|
<Time>] [end|endtime <Date>|<Time>]
gam print course-materials [todrive <ToDriveAttribute>*]
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>]
states <CourseStateList>])
(materialids <CourseMaterialIDEntity>)|((materialstates
<CourseMaterialStateList>)*
(orderby <CourseMaterialOrderByFieldName> [ascending|descending])*)
[showcreatoremails|creatoremail] [showtopicnames] [fields
<CourseMaterialFieldNameList>]
[formatjson [quotechar <Character>]]
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|
<Time>] [end|endtime <Date>|<Time>]
gam print course-submissions [todrive <ToDriveAttribute>*]
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>]
states <CourseStateList>])
(workids <CourseWorkIDEntity>)|((workstates <CourseWorkStateList>)*
(orderby <CourseWorkOrderByFieldName> [ascending|descending])*)
(submissionids <CourseSubmissionIDEntity>)|((submissionstates
<CourseSubmissionStateList>)*) [late|notlate]
[fields <CourseSubmissionFieldNameList>]
[formatjson [quotechar <Character>]] [showuserprofile]
[timefilter creationtime|updatetime] [start|starttime <Date>|<Time>] [end|
endtime <Date>|<Time>]
gam print course-topics [todrive <ToDriveAttribute>*]
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>]
states <CourseStateList>])
[topicids <CourseTopicIDEntity>]
[formatjson [quotechar <Character>]]
[timefilter updatetime] [start|starttime <Date>|<Time>] [end|endtime
<Date>|<Time>]
gam print course-works [todrive <ToDriveAttribute>*]
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>]
states <CourseStateList>])
(workids <CourseWorkIDEntity>)|((workstates <CourseWorkStateList>)*
(orderby <CourseWorkOrderByFieldName> [ascending|descending])*)
[showcreatoremails|creatoremail] [showtopicnames] [fields
<CourseWorkFieldNameList>]
[formatjson [quotechar <Character>]]
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|
<Time>] [end|endtime <Date>|<Time>]

# Classroom - Invitations

gam <UserTypeEntity> create classroominvitation courses <CourseEntity> [role owner|


student|teacher]
[adminaccess|asadmin] [csv|csvformat] [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> accept classroominvitation (ids
<ClassroomInvitationIDEntity>)|([courses <CourseEntity>] [role all|owner|student|
teacher])
gam <UserTypeEntity> delete classroominvitation (ids
<ClassroomInvitationIDEntity>)|([courses <CourseEntity>] [role all|owner|student|
teacher])
gam <UserTypeEntity> show classroominvitations [role all|owner|student|teacher]
[formatjson]
gam <UserTypeEntity> print classroominvitations [todrive <ToDriveAttribute>*] [role
all|owner|student|teacher]
[formatjson [quotechar <Character>]]

gam show classroominvitations (course|class <CourseEntity>)*|([teacher <UserItem>]


[student <UserItem>] [states <CourseStateList>])
[role all|owner|student|teacher]
[formatjson]
gam print classroominvitations [todrive <ToDriveAttribute>*] (course|class
<CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] [states
<CourseStateList>])
[role all|owner|student|teacher]
[formatjson [quotechar <Character>]]

# Classroom - Guardians

<GuardianInvitationState> ::=
complete|
pending
<GuardianInvitationStateList> ::=
"<GuardianInvitationState>(,<GuardianInvitationState>)*"

## Selected students, new style

gam <UserTypeEntity> create|add guardian|guardianinvitation <GuardianEntity>


gam <UserTypeEnfity> cancel guardianinvitation|guardianinvitations
<GuardianInvitationIDEntity>
gam <UserTypeEntity> delete guardian|guardians <GuardianEntity> [accepted|
invitations|all]
gam <UserTypeEntity> clear guardian|guardians [accepted|invitations|all]
gam <UserTypeEntity> sync guardian|guardians <GuardianEntity>
gam <UserTypeEntity> show guardian|guardians [accepted|invitations|all] [states
<GuardianInvitationStateList>] [invitedguardian <EmailAddress>]
[showstudentemails]
[formatjson]
gam <UserTypeEntity> print guardian|guardians [todrive <ToDriveAttribute>*]
[accepted|invitations|all] [states <GuardianInvitationStateList>] [invitedguardian
<EmailAddress>]
[showstudentemails]
[formatjson [quotechar <Character>]]

## Selected students, old style

gam create|add guardian|guardianinvitation <EmailAddress> <StudentItem>


gam cancel guardianinvitation|guardianinvitations <GuardianInvitationID>
<StudentItem>
gam delete guardian|guardians <GuardianItem> <StudentItem> [accepted|invitations|
all]
gam show guardian|guardians [accepted|invitations|all] [states
<GuardianInvitationStateList>] [invitedguardian <EmailAddress>]
[student <StudentItem>] [<UserTypeEntity>]
[showstudentemails]
[formatjson]
gam print guardian|guardians [todrive <ToDriveAttribute>*] [accepted|invitations|
all] [states <GuardianInvitationStateList>] [invitedguardian <EmailAddress>]
[student <StudentItem>] [<UserTypeEntity>]
[showstudentemails]
[formatjson [quotechar <Character>]]

## All students
gam print guardian|guardians [todrive <ToDriveAttribute>*] [accepted|invitations|
all] [states <GuardianInvitationStateList>] [invitedguardian <EmailAddress>]
[showstudentemails]
[formatjson [quotechar <Character>]]

# Classroom User Profiles

gam <UserTypeEntity> print classroomprofile [todrive <ToDriveAttribute>*]


gam <UserTypeEntity> show classroomprofile

# Customer

<CustomerAttribute> ::=
(primary <DomainName>)|
(adminsecondaryemail|alternateemail <EmailAddress>)|
(contact|contactname <String>)|
(language <LanguageCode>)|
(phone|phonenumber <String>)|
(name|organizationname <String>)|
(address|address1|addressline1 <String>)|
(address2|addressline2 <String>)|
(address3|addressline3 <String>)|
(city|locality <String>)|
(state|region <String>)|
(zipcode|postal|postalcode <String>)|
(country|countrycode <String>)

gam update customer <CustomerAttribute>*

gam info customer [formatjson]


gam info instance [formatjson]

# Data Transfers

gam print|show transferapps

<DataTransferService> ::=
calendar|
currents|
datastudio|"google data studio"|
googledrive|gdrive|drive|"drive and docs"
<DataTransferServiceList> ::= "<DataTransferService>(,<DataTransferService>)*"

<OldOwnerID> ::= <UserItem>


<NewOwnerID> ::= <UserItem>

gam create|add datatransfer|transfer <OldOwnerID> <DataTransferServiceList>


<NewOwnerID>
[private|shared|all] [release_resources]
(<ParameterKey> <ParameterValue>)*

gam info datatransfer|transfer <TransferID>


gam print datatransfers|transfers [todrive <ToDriveAttribute>*]
[olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
[status completed|failed|inprogress] [delimiter <Character>]
gam show datatransfers|transfers
[olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
[status completed|failed|inprogress] [delimiter <Character>]

# Domains

<DomainAlias> ::= <String>

gam create|add domain <DomainName>


gam update domain <DomainName> primary
gam delete domain <DomainName>

gam info domain [<DomainName>]


[formatjson]
gam print domains [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]
gam show domains [formatjson]

gam create|add domainalias|aliasdomain <DomainAlias> <DomainName>


gam delete domainalias|aliasdomain <DomainAlias>

gam info domainalias|aliasdomain <DomainAlias> [formatjson]


gam print domainaliases|aliasdomains [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]
gam show domainaliases|aliasdomains [formatjson]

# Domain - Contacts and Global Address List

<ContactAttribute> ::=
(additionalname|middlename <String>)|
(address clear|(work|home|other|<String> ((formatted|unstructured
<String>)|(streetaddress <String>)|(pobox <String>)|
(neighborhood <String>)|(locality <String>)|(region <String>)|
(postalcode <String>)|(country <String>))* notprimary|primary))|
(billinginfo <String>)|
(birthday <Date>)|
(calendar clear|(work|home|free-busy|<String> <URL> notprimary|primary))|
(directoryserver <String>)|
(email clear|(work|home|other|<String> <EmailAddress> notprimary|primary))|
(event clear|(anniversary|other|<String> <Date>))|
(externalid clear|(account|customer|network|organization|<String>
<String>))|
(familyname|lastname <String>)|
(gender female|male)|
(givenname|firstname <String>)|
(hobby clear|(<String>))|
(im clear|(work|home|other|<String> aim|gtalk|icq|jabber|msn|net_meeting|
qq|skype|yahoo <String> notprimary|primary))|
(initials <String>)|
(jot clear|(work|home|other|keywords|user> <String>))|
(json [charset <Charset>] <JSONData>)|(json file <FileName> [charset
<Charset>])|
(language <Language>)|
(location <String>)|
(maidenname <String>)|
(mileage <String>)|
(name <String>)|
(nickname <String>)|
(note <String>|(file <FileName> [charset <Charset>])|(gdoc
<UserGoogleDoc>))|
(occupation <String>)|
(organization clear|(work|other|<String> <String> ((location <String>)|
(department <String>)|(title <String>)|(jobdescription <String>)|(symbol
<String>))* notprimary|primary))|
(phone clear|(work|home|other|fax|work_fax|home_fax|other_fax|main|
company_main|assistant|mobile|work_mobile|pager|work_pager|car|radio|callback|isdn|
telex|tty_tdd|<String> <String> notprimary|primary))|
(prefix <String>)|
(priority low|normal|high)
(relation clear|(spouse|child|mother|father|parent|brother|sister|friend|
relative|domestic_partner|manager|assistant|referred_by|partner|<String>
<String>))|
(sensitivity confidential|normal|personal|private)
(shortname <String>)|
(subject <String>)|
(suffix <String>)|
(userdefinedfield clear|(<String> <String>))|
(website clear|(app_install_page|blog|ftp|home|home_page|other|profile|
reservations|work|<String> <URL> notprimary|primary))

<ContactSelection> ::=
[query <QueryContact>]
[emailmatchpattern <RegularExpression> [emailmatchtype work|home|other|
<String>]]
[updated_min <Date>]

gam create contact <ContactAttribute>+


gam update contacts <ContactEntity>|<ContactSelection> <ContactAttribute>+
gam clear contacts <ContactEntity>|<ContactSelection>
[emailclearpattern <RegularExpression>] [emailcleartype work|home|other|
<String>]
[delete_cleared_contacts_with_no_emails]
gam dedup contacts <ContactEntity>|<ContactSelection> [matchType [<Boolean>]]
gam delete contacts <ContactEntity>|<ContactSelection>

gam update contactphotos <ContactEntity>|<ContactSelection>


[drivedir|(sourcefolder <FilePath>)] [filename <FileNamePattern>]
gam get contactphotos <ContactEntity>|<ContactSelection>
[drivedir|(targetfolder <FilePath>)] [filename <FileNamePattern>]
gam delete contactphotos <ContactEntity>|<ContactSelection>

<ContactFieldName> ::=
additionalname|middlename|
address|
billinginfo|
birthday|
calendar|
contactgroup|
directoryserver|
email|
event|
externalid|
familyname|lastname|
gender|
givenname|firstname|
hobby|
im|
initials|
jot|
language|
location|
maidenname|
mileage|
name|
nickname|
note|
occupation|
organization|
phone|
prefix|
priority|
relation|
sensitivity|
shortname|
subject|
suffix|
updated|
userdefinedfield|
website
<ContactFieldNameList> ::= "<ContactFieldName>(,<ContactFieldName>)*"

<ContactOrderByFieldName> ::=
lastmodified

gam info contacts <ContactEntity>


[basic|full]
[fields <ContactFieldNameList>]
[formatjson]
gam show contacts <ContactSelection>
[basic|full|countsonly] [showdeleted] [orderby <ContactOrderByFieldName>
[ascending|descending]]
[fields <ContactFieldNameList>]
[formatjson]
gam print contacts [todrive <ToDriveAttribute>*] <ContactSelection>
[basic|full|countsonly] [showdeleted] [orderby <ContactOrderByFieldName>
[ascending|descending]]
[fields <ContactFieldNameList>]
[formatjson [quotechar <Character>]]

vgam info gal <ContactEntity>


[basic|full]
[fields <ContactFieldNameList>]
[formatjson]
gam show gal <ContactSelection>
[basic|full] [orderby <ContactOrderByFieldName> [ascending|descending]]
[fields <ContactFieldNameList>]
[formatjson]
gam print gal [todrive <ToDriveAttribute>*] <ContactSelection>
[basic|full] [orderby <ContactOrderByFieldName> [ascending|descending]]
[fields <ContactFieldNameList>]
[formatjson [quotechar <Character>]]

# Domain - People Contacts and Profiles

<PeopleSourceName> ::=
contact|contacts|
profile|profiles

<PeopleMergeSourceName> ::=
contact|contacts

<PeopleFieldName> ::=
addresses|
ageranges|
biographies|
birthdays|
calendarurls|
clientdata|
coverphotos|
emailaddresses|
events|
externalids|
genders|
imclients|
interests|
locales|
locations|
memberships|
metadata|
misckeywords|
names|
nicknames|
occupations|
organizations|
phonenumbers|
photos|
relations|
sipaddresses|
skills|
urls|
updated|updatetime|
userdefined
<PeopleFieldNameList> ::= "<PeopleFieldName>(,<PeopleFieldName>)*"

gam info peoplecontacts <PeopleResourceNameEntity>


[allfields|(fields <PeopleFieldNameList>)] [showmetadata]
[formatjson]
gam print peoplecontacts [todrive <ToDriveAttribute>*]
[sources <PeopleSourceName>]
[query <String>]
[mergesources <PeopleMergeSourceName>]
[coountsonly]
[allfields|(fields <PeopleFieldNameList>)] [showmetadata]
[formatjson [quotechar <Character>]]
gam show peoplecontacts
[sources <PeopleSourceName>]
[query <String>]
[mergesources <PeopleMergeSourceName>]
[coountsonly]
[allfields|(fields <PeopleFieldNameList>)] [showmetadata]
[formatjson]

gam info peopleprofile <PeopleResourceNameEntity>


[allfields|(fields <PeopleFieldNameList>)] [showmetadata]
[formatjson]
gam print peopleprofile [todrive <ToDriveAttribute>*]
[query <String>]
[mergesources <PeopleMergeSourceName>]
[allfields|(fields <PeopleFieldNameList>)] [showmetadata]
[formatjson [quotechar <Character>]]
gam show peopleprofile
[query <String>]
[mergesources <PeopleMergeSourceName>]
[allfields|(fields <PeopleFieldNameList>)] [showmetadata]
[formatjson]

# Drive Labels

gam [<UserTypeEntity>] info drivelabels <DriveLabelNameEntity>


[[basic|full] [languagecode <LanguageCode>]
[formatjson] [adminaccess|asadmin]
gam [<UserTypeEntity>] print drivelabels> [todrive <ToDriveAttribute>*]
[basic|full] [languagecode <LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
gam [<UserTypeEntity>] show drivelabels
[basic|full] [languagecode <LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson] [adminaccess|asadmin]

# Email Audit Monitor

gam audit monitor create <EmailAddress> <DestEmailAddress> [begin <DateTime>] [end


<DateTime>]
[incoming_headers] [outgoing_headers] [nochats] [nodrafts] [chat_headers]
[draft_headers]
gam audit monitor delete <EmailAddress> <DestEmailAddress>
gam audit monitor list <EmailAddress>

# Groups
<GroupSettingsAttribute> ::=
(allowexternalmembers <Boolean>)|
(allowwebposting <Boolean>)|
(archiveonly <Boolean>)|
(customfootertext <String>)|
(customreplyto <EmailAddress>)|
(defaultmessagedenynotificationtext <String>)|
(defaultsender self|group)|
(description <String>)|
(enablecollaborativeinbox|collaborative <Boolean>)|
(includeinglobaladdresslist|gal <Boolean>)|
(includecustomfooter <Boolean>)|
(isarchived <Boolean>)|
(memberscanpostasthegroup <Boolean>)|
(messagemoderationlevel moderate_all_messages|moderate_non_members|
moderate_new_members|moderate_none)|
(name <String>)|
(primarylanguage <Language>)|
(replyto reply_to_custom|reply_to_sender|reply_to_list|reply_to_owner|
reply_to_ignore|reply_to_managers)|
(sendmessagedenynotification <Boolean>)|
(spammoderationlevel allow|moderate|silently_moderate|reject)|
(whocanadd all_members_can_add|all_managers_can_add|all_owners_can_add|
none_can_add)|
(whocancontactowner anyone_can_contact|all_in_domain_can_contact|
all_members_can_contact|all_managers_can_contact)|
(whocanjoin anyone_can_join|all_in_domain_can_join|invited_can_join|
can_request_to_join)|
(whocanleavegroup all_members_can_leave|all_managers_can_leave|
all_owners_can_leave|none_can_leave)|
(whocanpostmessage none_can_post|all_managers_can_post|
all_members_can_post|all_owners_can_post|all_in_domain_can_post|anyone_can_post)|
(whocanviewgroup anyone_can_view|all_in_domain_can_view|
all_members_can_view|all_managers_can_view|all_owners_can_view)|
(whocanviewmembership all_in_domain_can_view|all_members_can_view|
all_managers_can_view|all_owners_can_view)
<GroupWhoCanDiscoverGroupDeprecatedAttribute> ::=
(showingroupdirectory <Boolean>)
<GroupWhoCanAssistContentDeprecatedAttribute> ::=
(whocanassigntopics all_members|owners_and_managers|managers_only|
owners_only|none)|
(whocanenterfreeformtags all_members|owners_and_managers|managers_only|
owners_only|none)|
(whocanhideabuse all_members|owners_and_managers|managers_only|owners_only|
none)|
(whocanmaketopicssticky all_members|owners_and_managers|managers_only|
owners_only|none)|
(whocanmarkduplicate all_members|owners_and_managers|managers_only|
owners_only|none)|
(whocanmarkfavoritereplyonanytopic all_members|owners_and_managers|
managers_only|owners_only|none)|
(whocanmarknoresponseneeded all_members|owners_and_managers|managers_only|
owners_only|none)|
(whocanmodifytagsandcategories all_members|owners_and_managers|
managers_only|owners_only|none)|
(whocantaketopics all_members|owners_and_managers|managers_only|
owners_only|none)|
(whocanunassigntopic all_members|owners_and_managers|managers_only|
owners_only|none)|
(whocanunmarkfavoritereplyonanytopic all_members|owners_and_managers|
managers_only|owners_only|none)
<GroupWhoCanModerateContentDeprecatedAttribute> ::=
(whocanapprovemessages all_members|owners_and_managers|owners_only|none)|
(whocandeleteanypost all_members|owners_and_managers|owners_only|none)|
(whocandeletetopics all_members|owners_and_managers|owners_only|none)|
(whocanlocktopics all_members|owners_and_managers|owners_only|none)|
(whocanmovetopicsin all_members|owners_and_managers|owners_only|none)|
(whocanmovetopicsout all_members|owners_and_managers|owners_only|none)|
(whocanpostannouncements all_members|owners_and_managers|owners_only|none)
<GroupWhoCanModerateMembersDeprecatedAttribute> ::=
(whocanadd all_members_can_add|all_managers_can_add|none_can_add)|
(whocanapprovemembers all_members_can_approve|all_managers_can_approve|
all_owners_can_approve|none_can_approve)|
(whocanbanusers all_members|owners_and_managers|owners_only|none)|
(whocaninvite all_members_can_invite|all_managers_can_invite|
all_owners_can_invite|none_can_invite)|
(whocanmodifymembers all_members|owners_and_managers|owners_only|none)
<GroupDeprecatedAttribute> ::=
(allowgooglecommunication <Boolean>)|
(favoriterepliesontop <Boolean>)|
(maxmessagebytes <ByteCount>)|
(messagedisplayfont default_font|fixed_width_font)|
(whocanaddreferences all_members|owners_and_managers|managers_only|
owners_only|none)|
(whocanmarkfavoritereplyonowntopic all_members|owners_and_managers|
managers_only|owners_only|none)
<GroupAttribute> ::=
(json [charset <Charset>] <JSONData>)|(json file <FileName> [charset
<Charset>])|
<GroupSettingsAttribute>|
(whocandiscovergroup all_members_can_discover|all_in_domain_can_discover|
anyone_can_discover)|
(whocanassistcontent all_members|owners_and_managers|managers_only|
owners_only|none)|
(whocanmoderatecontent all_members|owners_and_managers|owners_only|none)|
(whocanmoderatemembers all_members|owners_and_managers|owners_only|none)|
<GroupWhoCanDiscoverGroupDeprecatedAttribute>|
<GroupWhoCanAssistContentDeprecatedAttribute>|
<GroupWhoCanModerateContentDeprecatedAttribute>|
<GroupWhoCanModerateMembersDeprecatedAttribute>|
<GroupDeprecatedAttribute>

gam create|add group <EmailAddress>


[copyfrom <GroupItem>] <GroupAttribute>*
[verifynotinvitable]
gam update group|groups <GroupEntity> [email <EmailAddress>]
[copyfrom <GroupItem>] <GroupAttribute>*
[security|makesecuritygroup]
[admincreated <Boolean>]
[verifynotinvitable]
gam update group|groups <GroupEntity> create|add [<GroupRole>]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[[delivery] <DeliverySetting>]
[preview] [actioncsv]
<UserTypeEntity>
gam update group|groups <GroupEntity> delete|remove [<GroupRole>]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[preview] [actioncsv]
<UserTypeEntity>
gam update group|groups <GroupEntity> sync [<GroupRole>]
[usersonly|groupsonly] [addonly|removeonly]
[notsuspended|suspended] [notarchived|archived]
[removedomainnostatusmembers]
[[delivery] <DeliverySetting>]
[preview] [actioncsv]
<UserTypeEntity>
gam update group|groups <GroupEntity> update [<GroupRole>]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[[delivery] <DeliverySetting>]
[createifnotfound]
[preview] [actioncsv]
<UserTypeEntity>
gam update group|groups <GroupEntity> clear [member] [manager] [owner]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[emailclearpattern|emailretainpattern <RegularExpression>]
[removedomainnostatusmembers]
[preview] [actioncsv]
gam delete group|groups <GroupEntity>

<GroupFieldName> ::=
admincreated|
aliases|
allowexternalmembers|
allowgooglecommunication|
allowwebposting|
archiveonly|
customfootertext|
customreplyto|
customrolesenabledforsettingstobemerged|
defaultmessagedenynotificationtext|
description|
directmemberscount|
email|
enablecollaborativeinbox|collaborative|
favoriterepliesontop|
id|
includecustomfooter|
includeinglobaladdresslist|gal|
isarchived|
maxmessagebytes|
memberscanpostasthegroup|
messagedisplayfont|
messagemoderationlevel|
name|
primarylanguage|
replyto|
sendmessagedenynotification|
showingroupdirectory|
spammoderationlevel|
whocanaddreferences|
whocanadd|
whocanapprovemessages|
whocanassigntopics|
whocanassistcontent|
whocancontactowner|
whocandeleteanypost|
whocandeletetopics|
whocandiscovergroup|
whocanenterfreeformtags|
whocanhideabuse|
whocaninvite|
whocanjoin|
whocanleavegroup|
whocanlocktopics|
whocanmaketopicssticky|
whocanmarkduplicate|
whocanmarkfavoritereplyonanytopic|
whocanmarkfavoritereplyonowntopic|
whocanmarknoresponseneeded|
whocanmoderatecontent|
whocanmodifytagsandcategories|
whocanmovetopicsin|
whocanmovetopicsout|
whocanpostannouncements|
whocanpostmessage|
whocantaketopics|
whocanunassigntopic|
whocanunmarkfavoritereplyonanytopic|
whocanviewgroup|
whocanviewmembership
<GroupFieldNameList> ::= "<GroupFieldName>(,<GroupFieldName>)*"

<CIGroupFieldName> ::=
additionalgroupkeys|
createtime|
description|
displayname|
dynamicgroupmetadata|
groupkey|
labels|
name|
parent|
updatetime
<CIGroupFieldNameList> ::= "<CIGroupFieldName>(,<CIGroupFieldName>)*"

gam info group|groups <GroupEntity>


[nousers] [quick] [noaliases] [groups]
[basic] <GroupFieldName>* [fields <GroupFieldNameList>] [nodeprecated]
[ciallfields|(cifields <CIGroupFieldNameList>)]
[members] [managers] [owners]
[notsuspended|suspended] [notarchived|archived]
[types <GroupTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[formatjson]
gam print groups [todrive <ToDriveAttribute>*]
[([domain <DomainName>] ([member|showownedby <EmailItem>]|[query
<QueryGroup>]))|
(select <GroupEntity>)]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not]
<RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>] (matchsetting [not]
<GroupAttribute>)*
[admincreatedmatch <Boolean>]
[maxresults <Number>]
[allfields|([basic] [settings] <GroupFieldName>* [fields
<GroupFieldNameList>])]
[ciallfields|(cifields <CIGroupFieldNameList>)]
[nodeprecated]
[roles <GroupRoleList>]
[members|memberscount] [managers|managerscount] [owners|ownerscount]
[totalcount] [countsonly]
[includederivedmembership]
[notsuspended|suspended] [notarchived|archived]
[types <GroupTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[convertcrnl] [delimiter <Character>] [sortheaders]
[formatjson [quotechar <Character>]]

gam print grouptree <GroupEntity> [todrive <ToDriveAttribute>*]


gam show grouptree <GroupEntity>

<MembersFieldName> ::=
delivery|deliverysettings|
email|useremail|
group|groupemail|
id|
name|
role|
status|
type
<MembersFieldNameList> ::= "<MembersFieldName>(,<MembersFieldName>)*"

gam <UserTypeEntity> info member|group-members <GroupEntity>


gam info member|group-members <UserTypeEntity> <GroupEntity>
gam print group-members [todrive <ToDriveAttribute>*]
[([domain <DomainName>] ([member|showownedby <EmailItem>]|[query
<QueryGroup>]))|
(group|group_ns|group_susp <GroupItem>)|
(select <GroupEntity>)]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not]
<RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
[admincreatedmatch <Boolean>]
[roles <GroupRoleList>] [members] [managers] [owners]
[membernames] [showdeliverysettings]
<MembersFieldName>* [fields <MembersFieldNameList>]
[notsuspended|suspended] [notarchived|archived]
[types <GroupTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[userfields <UserFieldNameList>]
[(recursive [noduplicates])|includederivedmembership] [nogroupemail]
[peoplelookup|(peoplelookupuser <EmailAddress>)]
[formatjson [quotechar <Character>]]
gam show group-members
[([domain <DomainName>] ([member|showownedby <EmailItem>]|[query
<QueryGroup>]))|
(group|group_ns|group_susp <GroupItem>)|
(select <GroupEntity>)]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not]
<RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
[admincreatedmatch <Boolean>]
[roles <GroupRoleList>] [members] [managers] [owners] [depth <Number>]
[notsuspended|suspended] [notarchived|archived]
[types <GroupTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[includederivedmembership]

# Cloud Identity Groups

<CIGroupFieldsName> ::=
additionalgroupkeys|
createtime|
description|
displayname|
dynamicgroupmetadata|
groupkey|
labels|
name|
parent|
updatetime
<CIGroupFieldNameList> ::= "<CIGroupFieldName>(,<CIGroupFieldName>)*"

gam create cigroup <EmailAddress> [copyfrom <GroupItem>] <GroupAttribute>*


[makeowner] [alias|aliases <CIGroupAliasList>] [dynamic
<QueryDynamicGroup>]
gam update cigroup <GroupEntity> [copyfrom <GroupItem>] <GroupAttribute>
[security|makesecuritygroup|dynamicsecurity|makedynamicsecuritygroup]
[dynamic <QueryDynamicGroup>]
[memberrestrictions <QueryMemberRestrictions>]
gam update cigroups <GroupEntity> create|add [<GroupRole>]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[expire|expires <Time>] [preview] [actioncsv]
<UserTypeEntity>
gam update cigroups <GroupEntity> delete|remove [<GroupRole>]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[preview] [actioncsv]
<UserTypeEntity>
gam update cigroups <GroupEntity> sync [<GroupRole>]
[usersonly|groupsonly] [addonly|removeonly]
[notsuspended|suspended] [notarchived|archived]
[expire|expires <Time>] [preview] [actioncsv]
<UserTypeEntity>
gam update cigroups <GroupEntity> update [<GroupRole>]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[expire|expires <Time>] [preview] [actioncsv]
<UserTypeEntity>
gam update cigroups <GroupEntity> clear [member] [manager] [owner]
[usersonly|groupsonly]
[emailclearpattern|emailretainpattern <RegularExpression>]
[preview] [actioncsv]
gam delete cigroups <GroupEntity>

gam info cigroups <GroupEntity>


[nousers|membertree] [quick] [noaliases] [nojoindate] [showupdatedate]
[nosecurity|nosecuritysettings]
[allfields|<CIGroupFieldName>*|(fields <CIGroupFieldNameList>)]
[roles <GroupRoleList>] [members] [managers] [owners]
[types <CIGroupTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[formatjson]
gam print cigroups [todrive <ToDriveAttribute>*]
[(cimember|ciowner <UserItem>)|(select <GroupEntity>)]
[showownedby <UserItem>]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not]
<RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
[allfields|(<CIGroupFieldName>* [fields <CIGroupFieldNameList>])]
[roles <GroupRoleList>] [memberrestrictions]
[members|memberscount] [managers|managerscount] [owners|ownerscount]
[totalcount] [countsonly]
[types <CIGroupTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[convertcrnl] [delimiter <Character>]
[formatjson [quotechar <Character>]]

<CIGroupMembersFieldName> ::=
createtime
expiretime|
memberkey|
name|
role|
type|
updatetime|
useremail
<CIGroupMembersFieldNameList> ::=
"<CIGroupMembersFieldName>(,<CIGroupMembersFieldName>)*"

gam <UserTypeEntity> info cimember <GroupEntity>


gam info cimember <UserTypeEntity> <GroupEntity>
gam print cigroup-members [todrive <ToDriveAttribute>*]
[(cimember|ciowner <UserItem>)|(cigroup <GroupItem>)|(select
<GroupEntity>)]
[showownedby <UserItem>]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not]
<RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
[roles <GroupRoleList>] [members] [managers] [owners]
[types <CIGroupTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
<CIGroupMembersFieldName>* [fields <CIGroupMembersFieldNameList>]
[(recursive [noduplicates])includederivedmembership] [nogroupeemail]
[formatjson [quotechar <Character>]]
gam show cigroup-members
[(cimember|ciowner <UserItem>)|(cigroup <GroupItem>)|(select
<GroupEntity>)]
[showownedby <UserItem>]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not]
<RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
[roles <GroupRoleList>] [members] [managers] [owners] [depth <Number>]
[types <CIGroupTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]

# Licenses
gam print licenses [todrive <ToDriveAttribute>*]
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)|allskus|gsuite]
[maxresults <Integer>] [countsonly]
gam show licenses
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)|allskus|gsuite]
[maxresults <Integer>]

# Cloud Identity Devices

<DeviceID> ::= devices/<String>


<DeviceUserID> ::= devices/<String>/deviceUsers/<String>
<DeviceType> ::= android|chrome_os|google_sync|ios|linux|mac_os|windows

<DeviceFieldName> ::=
androidspecificattributes|
assettag|
basebandversion|
bootloaderversion|
brand|
buildnumber|
compromisedstate|
createtime|
devicetype|
enableddeveloperoptions|
enabledusbdebugging|
endpointverificationspecificattributes|
encryptionstate|
imei|
kernelversion|
lastsynctime|
managementstate|
manufacturer|
meid|
model|
name|
networkoperator|
osversion|
otheraccounts|
ownertype|
releaseversion|
securitypatchtime|
serialnumber|
wifimacaddresses
<DeviceFieldNameList> ::= "<DeviceFieldName>(,<DeviceFieldName>)*"

<DeviceUserFieldName> ::=
compromisedstate|
createtime|
firstsynctime|
languagecode|
lastsynctime|
managementstate|
name|
passwordstate|
useragent|
useremail
<DeviceUserFieldNameList> ::= "<DeviceUserFieldName>(,<DeviceUserFieldName>)*"
<DeviceOrderbyFieldName> ::=
createtime|devicetype|lastsynctime|model|osversion|serialnumber

<DeviceAction> ::=
cancelwipe|
wipe

gam create device serialnumber <String> devicetype <DeviceType> [assettag <String>]


gam delete device <DeviceEntity> [doit]
gam update device <DeviceEntity> action <DeviceAction> [removeresetlock] [doit]
gam cancelwipe device <DeviceEntity> [doit]
gam wipe device <DeviceEntity> [removeresetlock] [doit]

gam sync devices


[(query <QueryDevice>)|(queries <QueryDeviceList>) (querytime.* <Time>)*]
csvfile <FileName>
(devicetype_column <String>)|(static_devicetype <DeviceType>)
(serialnumber_column <String>)
[assettag_column <String>]
[unassigned_missing_action delete|wipe|donothing]
[assigned_missing_action delete|wipe|donothing]
[preview]

gam info device <DeviceEntity>


<DeviceFieldName>* [fields <DeviceFieldNameList>] [userfields
<DeviceUserFieldNameList>]
[nodeviceusers]
[formatjson]
gam print devices [todrive <ToDriveAttribute>*]
[(query <QueryDevice>)|(queries <QueryDeviceList>) (querytime.* <Time>)*]
<DeviceFieldName>* [fields <DeviceFieldNameList>] [userfields
<DeviceUserFieldNameList>]
[orderby <DeviceOrderByFieldName> [ascending|descending]]
[all|company|personal|nocompanydevices|nopersonaldevices]
[nodeviceusers]
[formatjson [quotechar <Character>]]

<DeviceUserAction> ::=
approve|
block|
cancelwipe|
wipe

gam delete deviceuser <DeviceUserEntity> [doit]


gam update deviceuser <DeviceUserEntity> action <DeviceUserAction> [doit]
gam approve deviceuser <DeviceUserEntity> [doit]
gam block deviceuser <DeviceUserEntity> [doit]
gam cancelwipe deviceuser <DeviceUserEntity> [doit]
gam wipe deviceuser <DeviceUserEntity> [doit]

gam info deviceuser <DeviceUserEntity>


<DeviceUserFieldName>* [fields <DeviceUserFieldNameList>]
[formatjson]
gam print deviceusers [todrive <ToDriveAttribute>*]
[select <DeviceID>]
[(query <QueryDevice>)|(queries <QueryDeviceList>) (querytime.* <Time>)*]
<DeviceUserFieldName>* [fields <DeviceUserFieldNameList>]
[orderby <DeviceOrderByFieldName> [ascending|descending]]
[formatjson [quotechar <Character>]]
gam info deviceuserstate <DeviceUserEntity> [clientid <String>]
gam update deviceuserstate <DeviceUserEntity> [clientid <String>]
[customid <String>] [assettags clear|<AssetTagList>]
[compliantstate|compliancestate compliant|noncompliant] [managedstate
clear|managed|unmanaged]
[healthscore very_poor|poor|neutral|good|very_good] [scorereason clear|
<String>]
(customvalue (bool|boolean <Boolean>)|(number <Integer>)|(string
<String>))*

# Mobile Devices

<MobileAction> ::=
admin_remote_wipe|wipe|
admin_account_wipe|accountwipe|wipeaccount|
approve|
block|
cancel_remote_wipe_then_activate|
cancel_remote_wipe_then_block

gam update mobile <MobileEntity> action <MobileAction>


[doit] [matchusers <UserTypeEntity>]
gam delete mobile <MobileEntity>
[doit] [matchusers <UserTypeEntity>]

<MobileFieldName> ::=
adbstatus|
applications|
basebandversion|
bootloaderversion|
brand|
buildnumber|
defaultlanguage|
developeroptionsstatus|
devicecompromisedstatus|
deviceid|
devicepasswordstatus|
email|
encryptionstatus|
firstsync|
hardware|
hardwareid|
imei|
kernelversion|
lastsync|
managedaccountisonownerprofile|
manufacturer|
meid|
model|
name|
networkoperator|
os|
otheraccountsinfo|
privilege|
releaseversion|
resourceid|
securitypatchlevel|
serialnumber|
status|
supportsworkprofile|
type|
unknownsourcesstatus|
useragent|
wifimacaddress

<MobileFieldNameList> ::= "<MobileFieldName>(,<MobileFieldName>)*"

<MobileOrderByFieldName> ::=
deviceid|email|lastsync|model|name|os|status|type

gam info mobile <MobileEntity>


[basic|full|allfields] <MobileFieldName>* [fields <MobileFieldNameList>]
[formatjson]
gam print mobile [todrive <ToDriveAttribute>*]
[(query <QueryMobile>)|(queries <QueryMobileList>) (querytime.* <Time>)*]
[orderby <MobileOrderByFieldName> [ascending|descending]]
[basic|full|allfields] <MobileFieldName>* [fields <MobileFieldNameList>]
[delimiter <Character>] [appslimit <Number>] [oneappperrow] [listlimit
<Number>]
[formatjson [quotechar <Character>]]

# Organizational Units

<OrgUnitFieldName> ::=
description|
id|orgunitid|
inherit|blockinheritance|
name|
parentid|parentorgunitid|
parent|parentorgunitpath|
path|orgunitpath
<OrgUnitFieldNameList> ::= "<OrgUnitFieldName>(,<OrgUnitFieldName>)*"

gam create|add org|ou <OrgUnitPath> [description <String>] [parent <OrgUnitItem>]


[inherit|noinherit|(blockinheritance <Boolean>)] [buildpath]
gam update org|ou <OrgUnitItem> [name <String>] [description <String>] [parent
<OrgUnitItem>] [inherit|noinherit|(blockinheritance <Boolean>)]
gam update org|ou <OrgUnitItem> add|move <CrOSTypeEntity> [quickcrosmove
[<Boolean>]]
gam update org|ou <OrgUnitItem> add|move <UserTypeEntity>
gam update org|ou <OrgUnitItem> sync <CrOSTypeEntity> [removetoou <OrgUnitItem>]
[quickcrosmove [<Boolean>]]
gam update org|ou <OrgUnitItem> sync <UserTypeEntity> [removetoou <OrgUnitItem>]
gam delete org|ou <OrgUnitItem>

gam update orgs|ous <OrgUnitEntity> [name <String>] [description <String>] [parent


<OrgUnitItem>] [inherit|noinherit|(blockinheritance <Boolean>)]
gam update orgs|ous <OrgUnitEntity> add|move <CrOSTypeEntity> [quickcrosmove
[<Boolean>]]
gam update orgs|ous <OrgUnitEntity> add|move <UserTypeEntity>
gam update orgs|ous <OrgUnitEntity> sync <CrOSTypeEntity> [removetoou
<OrgUnitItem>] [quickcrosmove [<Boolean>]]
gam update orgs|ous <OrgUnitEntity> sync <UserTypeEntity> [removetoou
<OrgUnitItem>]
gam delete orgs|ous <OrgUnitEntity>

gam info org|ou <OrgUnitItem> [nousers|notsuspended|suspended] [children|child]


gam info orgs|ous <OrgUnitEntity> [nousers|notsuspended|suspended] [children|child]

<OrgUnitSelector> ::=
cros_ou | cros_ou_and_children|
ou | ou_ns | ou_susp|
ou_and_children | ou_and_children_ns | ou_and_children_susp

gam print orgs|ous [todrive <ToDriveAttribute>*]


[fromparent <OrgUnitItem>] [showparent] [toplevelonly]
[parentselector <OrgUnitSelector> childselector <OrgUnitSelector>]
[allfields|<OrgUnitFieldName>*|(fields <OrgUnitFieldNameList>)]
[convertcrnl] [batchsuborgs [<Boolean>]]
[mincroscount <Number>] [maxcroscount <Number>]
[minusercount <Number>] [maxusercount <Number>]
gam show orgtree [fromparent <OrgUnitItem>] [batchsuborgs [<Boolean>]]

# Printers

<PrinterAttribute> ::=
(description <String>)|
(displayname <String>)|
(json [charset <Charset>] <JSONData>)|(json file <FileName> [charset
<Charset>])|
(makeandmodel <String>)|
(ou|org|orgunit <OrgUnitItem>)|
(uri <String>)|
(driverless [<Boolean>])

<PrinterFieldName> ::=
auxiliarymessages|
createtime|
description|
displayname|
id|
makeandmodel|
name|
ou|org|orgunit|orgunitid|
uri|
usedriverlessconfig|
<PrinterFieldNameList> ::= "<PrinterFieldName>(,<PrinterFieldName>)*"

gam create printer <PrinterAttribute>+


gam update printer <PrinterID> <PrinterAttribute>+
gam delete printer
<PrinterIDList>|
file (<FileName>|(gdoc <UserGoogleDoc>)
[charset <Charset>] [delimiter <Character>]))|
csvfile ((<FileName>(:<FieldName>)+)|(gsheet(:<FieldName>)+
<UserGoogleSheet>)|(gdoc:<FieldName>)+ <UserGoogleDoc>)
[charset <Charset>] [warnifnodata] [columndelimiter <Character>]
[quotechar <Character>])
[fields <FieldNameList>]
(matchfield|skipfield <FieldName> <RegularExpression>)*
[delimiter <Character>])

gam info printer <PrinterID>


[fields <PrinterFieldNameList>]
[formatjson]
gam show printers
[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[filter <String>] [showinherited [<Boolean>]
[fields <PrinterFieldNameList>]
[formatjson]
gam print printers [todrive <ToDriveAttribute>*]
[(ou <OrgUnitItem>)|(ou_and_children <OrgUnitItem>)|
(ous <OrgUnitList>)|(ous_and_children <OrgUnitList>)]
[filter <String>] [showinherited [<Boolean>]
[fields <PrinterFieldNameList>] [[formatjson [quotechar <Character>]]

gam show printermodels


[filter <String>]
[formatjson]
gam print printermodels [todrive <ToDriveAttribute>*]
[filter <String>]
[[formatjson [quotechar <Character>]]

# Reports

gam report usageparameters customer|user [todrive <ToDriveAttribute>*]


gam report usage user [todrive <ToDriveAttribute>*]
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath> [showorgunit])|(select
<UserTypeEntity>)]
[([start|startdate <Date>] [end|enddate <Date>])|(range <Date> <Date>)|
thismonth|(previousmonths <Integer>)]
[skipdates <Date>[:<Date>](,<Date>[:<Date>])*] [skipdaysofweek
<DayOfWeek>(,<DayOfWeek>)*]
[fields|parameters <String>]
gam report usage customer [todrive <ToDriveAttribute>*]
[([start|startdate <Date>] [end|enddate <Date>])|(range <Date> <Date>)|
thismonth|(previousmonths <Integer>)]
[skipdates <Date>[:<Date>](,<Date>[:<Date>])*] [skipdaysofweek
<DayOfWeek>(,<DayOfWeek>)*]
[fields|parameters <String>]

<ActivityApplicationName> ::=
access|accesstransparency|
admin|
calendar|calendars|
chat|
chrome|
contextawareaccess|
currents|gplus|google+|
datastudio|
domain|
drive|doc|docs|
gcp|
groups|group|
groupsenterprise|enterprisegroups|
jamboard|
keep|
login|logins|
meet|hangoutsmeet|
mobile|
rules|
saml|
token|tokens|oauthtoken|
useraccounts
gam report <ActivityApplicationName> [todrive <ToDriveAttribute>*]
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath> [showorgunit])|(select
<UserTypeEntity>)]
[([start <Time>] [end <Time>])|(range <Time> <Time>)|
yesterday|thismonth|(previousmonths <Integer>)]
[filtertime.* <Time>] [filter|filters <String>]
[event|events <EventNameList>] [ip <String>]
[groupidfilter <String>]
[maxactivities <Number>] [maxresults <Number>]
[countsonly [summary] [eventrowfilter]]

<CustomerServiceName> ::=
accounts|
app_maker|
apps_scripts|
calendar|
classroom|
cros|
device_management|
docs|
drive|
gmail|
gplus|
meet|
sites
<CustomerServiceNameList> ::= "<CustomerServiceName>(,<CustomerServiceName>)*"

gam report customers|customer|domain [todrive <ToDriveAttribute>*]


[(date <Date>)|(range <Date> <Date>)|
yesterday|thismonth|(previousmonths <Integer>)]
[nodatechange | (fulldatarequired all|<CustomerServiceNameList>)]
[(fields|parameters <String>)|(services <CustomerServiceNameList>)]
[noauthorizedapps]

<UserServiceName> ::=
accounts|
classroom|
docs|
drive|
gmail|
gplus
<UserServiceNameList> ::= "<UserServiceName>(,<UserServiceName>)*"

gam report users|user [todrive <ToDriveAttribute>*]


[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath> [showorgunit])|(select
<UserTypeEntity>)]
[allverifyuser <UserItem>]
[(date <Date>)|(range <Date> <Date>)|
yesterday|thismonth|(previousmonths <Integer>)]
[nodatechange | (fulldatarequired all|<UserServiceNameList>)]
[filtertime.* <Time>] [filter|filters <String>]
[(fields|parameters <String>)|(services <UserServiceNameList>)]
[aggregatebydate [Boolean]]
[maxresults <Number>]

# Reseller

<ResoldCustomerAttribute> ::=
(email|alternateemail <EmailAddress>)|
(contact|contactname <String>)|
(phone|phonenumber <String>)|
(name|organizationname <String>)|
(address|address1|addressline1 <String>)|
(address2|addressline2 <String>)|
(address3|addressline3 <String>)|
(city|locality <String>)|
(state|region <String>)|
(zipcode|postal|postalcode <String>)|
(country|countrycode <String>)

gam create|add resoldcustomer <CustomerDomain> (customer_auth_token <String>)


<ResoldCustomerAttribute>+
gam update resoldcustomer <CustomerID> [customer_auth_token <String>]
<ResoldCustomerAttribues>+
gam info resoldcustomer <CustomerID> [formatjson]

gam create|add resoldsubscription <CustomerID> (sku <SKUID>)


(plan annual_monthly_pay|annual_yearly_pay|flexible|trial) (seats
<NumberOfSeats> <MaximumNumberOfSeats>)
[customer_auth_token <String>] [deal <String>] [purchaseorderid <String>]
gam update resoldsubscription <CustomerID> <SKUID>
activate|suspend|startpaidservice|
(renewal auto_renew_monthly_pay|auto_renew_yearly_pay|cancel|
renew_current_users_monthly_pay|renew_current_users_yearly_pay|
switch_to_pay_as_you_go)|
(seats <NumberOfSeats> [<MaximumNumberOfSeats>])|
(plan annual_monthly_pay|annual_yearly_pay|flexible|trial [deal <String>]
[purchaseorderid <String>] [seats <NumberOfSeats> [<MaximumNumberOfSeats>]])
gam delete resoldsubscription <CustomerID> <SKUID> cancel|downgrade|
transfer_to_direct
gam info resoldsubscription <CustomerID> <SKUID>
[formatjson]
gam show resoldsubscriptions
[customerid <CustomerID>] [customer_auth_token <String>] [customer_prefix
<String>]
[maxresults <Number>]
[formatjson]
gam print resoldsubscriptions [todrive <ToDriveAttribute>*]
[customerid <CustomerID>] [customer_auth_token <String>] [customer_prefix
<String>]
[maxresults <Number>]
[formatjson [quotechar <Character>]]

# Resource Calendars

<BuildingFieldName> ::=
address|
buildingid|
buildingname|
coordinates|
description|
floors|
floornames|
id|
name
<BuildingFieldNameList> ::= "<BuildingFieldName>(,<BuildingFieldName>)*"
<BuildingAttribute> ::=
(address|addresslines <String>)|
(city|locality <String>)|
(country|regioncode <String>)|
(description <String>)|
(floors <FloorNameList>)|
(id <String>)|
(language|languageCode <Language>)|
(latitude <Float>)|
(longitude <Float>)|
(name <String>)
(state|administrativearea <String>)|
(sublocality <String>)|
(zipcode|postalcode <String>)

<ResourceAttribute> ::=
(buildingid <BuildingID>)|
(capacity <Number>)|
(category other|room|conference_room|category_unknown|unknown)|
(description <String>)|
(features <FeatureNameList>)|
(floor <FloorName>)|
(floorsection <String>)|
(name <String>)|
(type <String>)|
(uservisibledescription <String>)

<ResourceFieldName> ::=
acls|
buildingid|
calendar|
capacity|
category|
description|
email|
featureinstances|
features|
floor|
floorsection|
generatedresourcename|
id|
name|
resourcecategory|
resourcedescription|
resourceemail|
resourceid|
resourcename|
resourcetype|
type|
uservisibledescription
<ResourceFieldNameList> ::= "<ResourceFieldName>(,<ResourceFieldName>)*"

gam create|add building <Name> <BuildingAttribute>*


gam update building <BuildIngID> <BuildingAttribute>*
gam delete building <BuildingID>
gam info building <BuildingID>
[formatjson]
gam show buildings
[allfields|<BuildingFildName>*|(fields <BuildingFieldNameList>)]
[formatjson]
gam print buildings [todrive <ToDriveAttribute>*]
[allfields|<BuildingFildName>*|(fields <BuildingFieldNameList>)]
[delimiter <Character>] [formatjson [quotechar <Character>]]

gam create|add feature name <Name>


gam update feature <Name> name <Name>
gam delete feature <Name>
gam show features
gam print features [todrive <ToDriveAttribute>*]

gam create|add resource <ResourceID> <Name> <ResourceAttribute>*


gam update resource <ResourceID> <ResourceAttribute>*
gam delete resource <ResourceID>
gam info resource <ResourceID> [acls] [calendar]
[formatjson]

gam update resources <ResourceEntity> <ResourceAttribute>*


gam delete resources <ResourceEntity>
gam info resources <ResourceEntity> [acls] [calendar]
[formatjson]

gam show resources [allfields|<ResourceFieldName>*|(fields


<ResourceFieldNameList>)]
[query <String>]
[acls] [calendar] [convertcrnl]
[formatjson]
gam print resources [todrive <ToDriveAttribute>*] [allfields|<ResourceFieldName>*|
(fields <ResourceFieldNameList>)]
[query <String>]
[acls] [calendar] [convertcrnl]
[formatjson [quotechar <Character>]]

<CalendarACLRole> ::= editor|freebusy|freebusyreader|owner|reader|writer|none


<CalendarACLScope> ::= <EmailAddress>|user:<EmailAdress>|group:<EmailAddress>|
domain:<DomainName>|domain|default
<CalendarACLScopeList> ::= "<CalendarACLScope>(,<CalendarACLScope>)*"
<CalendarACLScopeEntity> ::= <CalendarACLScopeList> | <FileSelector> |
<CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>

gam resource <ResourceID> create|add acls|calendaracls <CalendarACLRole>


<CalendarACLScopeEntity> [sendnotifications <Boolean>]
gam resource <ResourceID> update acls|calendaracls <CalendarACLRole>
<CalendarACLScopeEntity> [sendnotifications <Boolean>]
gam resource <ResourceID> delete acls|calendaracls [<CalendarACLRole>]
<CalendarACLScopeEntity>
gam resource <ResourceID> info acls|calendaracls <CalendarACLScopeEntity>
[formatjson]

gam resource <ResourceID> show acls|calendaracls [formatjson]


gam resource <ResourceID> print acls|calendaracls [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

gam resources <ResourceEntity> create|add acls|calendaracls <CalendarACLRole>


<CalendarACLScopeEntity> [sendnotifications <Boolean>]
gam resources <ResourceEntity> update acls|calendaracls <CalendarACLRole>
<CalendarACLScopeEntity> [sendnotifications <Boolean>]
gam resources <ResourceEntity> delete acls|calendaracls [<CalendarACLRole>]
<CalendarACLScopeEntity>
gam resources <ResourceEntity> info acls|calendaracls <CalendarACLScopeEntity>
[formatjson]

gam resources <ResourceEntity> show acls|calendaracls [formatjson]


gam resources <ResourceEntity> print acls|calendaracls [todrive
<ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

# Schemas

<SchemaFieldDefinition> ::=
field <FieldName> [displayname <String>]
(type bool|date|double|email|int64|phone|string)
[multivalued|multivalue] [indexed] [restricted]
[range <Number> <Number>]
endfield

gam create|add schema|schemas <SchemaName> [displayname <String>]


<SchemaFieldDefinition>+
gam update schema <SchemaName> [displayname <String>] <SchemaFieldDefinition>*
(deletefield <FieldName>)*
gam delete schema <SchemaName>
gam info schema <SchemaName>

gam update schemas <SchemaEntity> [displayname <String>] <SchemaFieldDefinition>*


(deletefield <FieldName>)*
gam delete schemas <SchemaEntity>

gam info schemas <SchemaEntity>


gam show schema|schemas
gam print schema|schemas [todrive <ToDriveAttribute>*]

# Send Email

gam sendemail [recipient|to] <RecipientEntity>


[from <EmailAddress>] [mailbox <EmailAddress>] [replyto <EmailAddress>]
[cc <RecipientEntity>] [bcc <RecipientEntity>] [singlemessage]
[subject <String>]
(message|textmessage <String>)|(file|textfile <FileName> [charset
<CharSet>])|(gdoc <UserGoogleDoc>)
(htmlmessage <String>)|(htmlfile <FileName> [charset <CharSet>])|(ghtml
<UserGoogleDoc>)
(replace <Tag> <String>)* [html [<Boolean>]] (attach <FileName> [charset
<CharSet>])*
[newuser <EmailAddress> firstname|givenname <String> lastname|familyname
<string> password <Password>]
(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String>
<String>)*
gam <UserTypeEntity> sendemail [recipient|to <RecipientEntity>]
[replyto <EmailAddress>]
[cc <RecipientEntity>] [bcc <RecipientEntity>] [singlemessage]
[subject <String>]
(message|textmessage <String>)|(file|textfile <FileName> [charset
<CharSet>])|(gdoc <UserGoogleDoc>)
(htmlmessage <String>)|(htmlfile <FileName> [charset <CharSet>])|(ghtml
<UserGoogleDoc>)
(replace <Tag> <String>)* [html [<Boolean>]] (attach <FileName> [charset
<CharSet>])*
[newuser <EmailAddress> firstname|givenname <String> lastname|familyname
<string> password <Password>]
(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String>
<String>)*

# Sites

<SiteACLRole> ::= editor|owner|reader|writer


<SiteACLRoleList> ::= "<SiteACLRole>(,<SiteACLRole>)*"

<SiteACLScope> ::= <EmailAddress>|user:<EmailAdress>|group:<EmailAddress>|


domain:<DomainName>|domain|default
<SiteACLScopeList> ::= "<SiteACLScope>(,<SiteACLScope>)*"
<SiteACLScopeEntity> ::= <SiteACLScopeList> | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVDataSelector>

<SiteAttribute> ::=
(categories <String>)|
(name <String>)|
(sourcelink <URI>])|
(summary <String>)|
(theme <String>)

gam [<UserTypeEntity>] create|add site <SiteItem> <SiteAttribute>*


gam [<UserTypeEntity>] update sites <SiteEntity> <SiteAttribute>+
gam [<UserTypeEntity>] info sites <SiteEntity> [withmappings] [role|roles all|
<SiteACLRoleList>]
gam [<UserTypeEntity>] show sites [domain|domains <DomainNameEntity>]
[includeallsites]
[withmappings] [role|roles all|<SiteACLRoleList>] [startindex <Number>]
[maxresults <Number>]
gam [<UserTypeEntity>] print sites [todrive <ToDriveAttribute>*] [domain|domains
<DomainNameEntity>] [includeallsites]
[withmappings] [role|roles all|<SiteACLRoleList>] [startindex <Number>]
[maxresults <Number>] [convertcrnl] [delimiter <Character>]

gam [<UserTypeEntity>] print siteactivity <SiteEntity> [todrive


<ToDriveAttribute>*] [startindex <Number>] [maxresults <Number>] [updated_min
<Date>] [updated_max <Date>]

gam [<UserTypeEntity>] create|add siteacls <SiteEntity> <SiteACLRole>


<SiteACLScopeEntity>
gam [<UserTypeEntity>] update siteacls <SiteEntity> <SiteACLRole>
<SiteACLScopeEntity>
gam [<UserTypeEntity>] delete siteacls <SiteEntity> <SiteACLScopeEntity>
gam [<UserTypeEntity>] info siteacls <SiteEntity> <SiteACLScopeEntity>
gam [<UserTypeEntity>] show siteacls <SiteEntity>
gam [<UserTypeEntity>] print siteacls <SiteEntity> [todrive <ToDriveAttribute>*]

# Shared Drives

<SharedDriveFieldName> ::=
backgroundimagefile|
backgroundimagelink|
capabilities|
colorrgb|
createdtime|
id|
name|
restrictions|
themeid
<SharedDriveFieldNameList> ::= "<SharedDriveFieldName>(,<SharedDriveFieldName>)*"

<SharedDriveRestrictionsFieldName> ::=
adminmanagedrestrictions|
copyrequireswriterpermission|
domainusersonly|
drivemembersonly|teammembersonly

In these commands, the Google administrator named in oauth2.txt is used.

gam show teamdrivethemes


gam create|add teamdrive <Name>
[(theme|themeid <String>) | ([customtheme <DriveFileID> <Float> <Float>
<Float>] [color <ColorValue>])]
(<SharedDriveRestrictionsSubfieldName> <Boolean>)*
[hide|hidden <Boolean>]
[csv [todrive <ToDriveAttribute>*]] [returnidonly]
gam update teamdrive <SharedDriveEntity> [name <Name>]
[(theme|themeid <String>) | ([customtheme <DriveFileID> <Float> <Float>
<Float>] [color <ColorValue>])]
(<SharedDriveRestrictionsFieldName> <Boolean>)*
[hide|hidden <Boolean>] [ou|org|orgunit <OrgUnitItem>]
gam delete teamdrive <SharedDriveEntity>
[adminaccess|asadmin] [allowitemdeletion]
gam hide teamdrive <SharedDriveEntity>
gam unhide teamdrive <SharedDriveEntity>
gam info teamdrive <SharedDriveEntity> [fields <SharedDriveFieldNameList>]
[formatjson]
gam show teamdriveinfo <SharedDriveEntity> [fields <SharedDriveFieldNameList>]
[formatjson]
gam print teamdrives [todrive <ToDriveAttribute>*]
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>]
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
[formatjson [quotechar <Character>]]
gam show teamdrives
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>]
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
[formatjson] [noorgunits [<Boolean>]]

gam print oushareddrives [todrive <ToDriveAttribute>*]


[ou|org|orgunit <OrgUnitPath>]
[formatjson [quotechar <Character>]]
gam show oushareddrives
[ou|org|orgunit <OrgUnitPath>]
[formatjson]

In these commands, you specify an administrator and then indicate that you want
domain administrator access with the adminaccess option.

gam <UserTypeEntity> create|add teamdrive <Name> adminaccess


[(theme|themeid <String>) | ([customtheme <DriveFileID> <Float> <Float>
<Float>] [color <ColorValue>])]
(<SharedDriveRestrictionsSubfieldName> <Boolean>)*
[hide <Boolean>]
[csv [todrive <ToDriveAttribute>*]] [returnidonly]
gam <UserTypeEntity> delete teamdrive <SharedDriveEntity>
adminaccess [allowitemdeletion]
gam <UserTypeEntity> info teamdrive <SharedDriveEntity> adminaccess [fields
<SharedDriveFieldNameList>]
[formatjson]
gam <UserTypeEntity> show teamdriveinfo <SharedDriveEntity> adminaccess [fields
<SharedDriveFieldNameList>]
[formatjson]
gam <UserTypeEntity> print teamdrives [todrive <ToDriveAttribute>*]
adminaccess [teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] (role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>]
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> show teamdrives
adminaccess [teamdriveadminquery|query <QueryTeamDrive>]
[matchname <RegularExpression>] (role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>]
[formatjson]

These commands are used to manage the ACLs on the Team Drives themselves, not the
files/folders on the Team Drives.

<DrivePermissionsFieldName> ::=
additionalroles|
allowfilediscovery|
basicpermissions|
deleted|
displayname|
domain|
emailaddress|
expirationdate|
expirationtime|
id|
name|
pendingowner|
permissiondetails|
photolink|
role|
type|
view|
withlink
<DrivePermissionsFieldNameList> ::=
"<DrivePermissionsFieldName>(,<DrivePermissionsFieldName>)*"

In these commands, the Google administrator named in oauth2.txt is used.

gam create|add drivefileacl <SharedDriveEntityAdmin>


anyone|(user <UserItem>)|(group <GroupItem>)|(domain <DomainName>)
(role <DriveFileACLRole>) [withlink|(allowfilediscovery|discoverable
[<Boolean>])]
[expiration <Time>] [sendemail] [emailmessage <String>]
[showtitles] [nodetails|(csv [todrive <ToDriveAttribute>*] [formatjson
[quotechar <Character>]])]
gam update drivefileacl <SharedDriveEntityAdmin> <DriveFilePermissionIDorEmail>
(role <DriveFileACLRole>) [expires|expiration <Time>] [removeexpiration
[<Boolean>]]
[showtitles] [nodetails|(csv [todrive <ToDriveAttribute>*] [formatjson
[quotechar <Character>]])]
gam delete drivefileacl <SharedDriveEntityAdmin> <DriveFilePermissionIDorEmail>
[showtitles]
gam info drivefileacl <SharedDriveEntityAdmin> <DriveFilePermissionIDorEmail>
[showtitles]
[formatjson]
gam show drivefileacls <SharedDriveEntityAdmin>
(role|roles <DriveFileACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[includepermissionsforview published]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields
<DrivePermissionsFieldNameList>)]
[showtitles|(addtitle <String>)]]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[formatjson]
gam print drivefileacls <SharedDriveEntityAdmin> [todrive <ToDriveAttribute>*]
(role|roles <DriveFileACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[includepermissionsforview published]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields
<DrivePermissionsFieldNameList>)]
[showtitles|(addtitle <String>)]]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[formatjson [quotechar <Character>]]
gam create|add permissions <SharedDriveEntityAdmin> <DriveFilePermissionEntity>
[expires|expiration <Time>] [sendemail] [emailmessage <String>]
<PermissionMatch>* [<PermissionMatchAction>]
gam delete permissions <SharedDriveEntityAdmin> <DriveFilePermissionIDEntity>
<PermissionMatch>* [<PermissionMatchAction>]

In these commands, you specify an administrator and then indicate that you want
domain administrator access with the adminaccess option.

gam <UserTypeEntity> create|add drivefileacl <SharedDriveEntityAdmin>


anyone|(user <UserItem>)|(group <GroupItem>)|(domain <DomainName>)
(role <DriveFileACLRole>) [withlink|(allowfilediscovery|discoverable
[<Boolean>])]
[movetonewownersroot [<Boolean>]]
[expiration <Time>] [sendemail] [emailmessage <String>]
[showtitles] [nodetails|(csv [todrive <ToDriveAttribute>*] [formatjson
[quotechar <Character>]])]
adminaccess
gam <UserTypeEntity> update drivefileacl <SharedDriveEntityAdmin>
<DriveFilePermissionIDorEmail>
(role <DriveFileACLRole>) [expires|expiration <Time>] [removeexpiration
[<Boolean>]]
[showtitles] [nodetails|(csv [todrive <ToDriveAttribute>*] [formatjson
[quotechar <Character>]])]
adminaccess
gam <UserTypeEntity> delete drivefileacl <SharedDriveEntityAdmin>
<DriveFilePermissionIDorEmail> [showtitles] adminaccess
gam <UserTypeEntity> info drivefileacl <SharedDriveEntityAdmin>
<DriveFilePermissionIDorEmail> adminaccess
[showtitles]
[formatjson]
gam <UserTypeEntity> show drivefileacls <SharedDriveEntityAdmin> adminaccess
(role|roles <DriveFileACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[includepermissionsforview published]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields
<DrivePermissionsFieldNameList>)]
[showtitles|(addtitle <String>)]]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[formatjson]
gam <UserTypeEntity> print drivefileacls <SharedDriveEntityAdmin> [todrive
<ToDriveAttribute>*] adminaccess
(role|roles <DriveFileACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[includepermissionsforview published]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields
<DrivePermissionsFieldNameList>)]
[showtitles|(addtitle <String>)]]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> create|add permissions <SharedDriveEntityAdmin>
<DriveFilePermissionEntity>
[expires|expiration <Time>] [sendemail] [emailmessage <String>] adminaccess
<PermissionMatch>* [<PermissionMatchAction>]
gam <UserTypeEntity> delete permissions <SharedDriveEntityAdmin>
<DriveFilePermissionIDEntity> adminaccess
<PermissionMatch>* [<PermissionMatchAction>]

In these commands, the Google administrator named in oauth2.txt is used.

gam copy teamdriveacls <SharedDriveEntity> to <SharedDriveEntity>


[adminaccess|asadmin]
[showpermissionsmessages [<Boolean>]]
[excludepermissionsfromdomains <DomainNameList>]
(mappermissionsdomain <DomainName> <DomainName>)*
gam sync teamdriveacls <SharedDriveEntity> with <SharedDriveEntity>
[adminaccess|asadmin]
[showpermissionsmessages [<Boolean>]]
[excludepermissionsfromdomains <DomainNameList>]
(mappermissionsdomain <DomainName> <DomainName>)*

gam print teamdriveacls [todrive <ToDriveAttribute>*]


[teamdriveadminquery|query <QueryTeamDrive>] [matchname
<RegularExpression>]
[user|group <EmailAddress> [checkgroups]] (role|roles
<SharedDriveACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields
<DrivePermissionsFieldNameList>)]
[formatjson [quotechar <Character>]]
gam show teamdriveacls
[teamdriveadminquery|query <QueryTeamDrive>] [matchname
<RegularExpression>]
[user|group <EmailAddress> [checkgroups]] (role|roles
<SharedDriveACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields
<DrivePermissionsFieldNameList>)]
[formatjson [quotechar <Character>]]

In these commands, you specify an administrator and then indicate that you want
domain administrator access with the adminaccess option.

gam <UserTypeEntity> copy teamdriveacls <SharedDriveEntity> to <SharedDriveEntity>


[adminaccess|asadmin]
[showpermissionsmessages [<Boolean>]]
[excludepermissionsfromdomains <DomainNameList>]
(mappermissionsdomain <DomainName> <DomainName>)*
gam <UserTypeEntity> sync teamdriveacls <SharedDriveEntity> with
<SharedDriveEntity>
[adminaccess|asadmin]
[showpermissionsmessages [<Boolean>]]
[excludepermissionsfromdomains <DomainNameList>]
(mappermissionsdomain <DomainName> <DomainName>)*

gam <UserTypeEntity> print teamdriveacls [todrive <ToDriveAttribute>*]


[adminaccess|asadmin]
[teamdriveadminquery|query <QueryTeamDrive>] [matchname
<RegularExpression>]
[user|group <EmailAddress> [checkgroups]] (role|roles
<SharedDriveACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields
<DrivePermissionsFieldNameList>)]
[shownopermissionsdrives false|true|only]
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> show teamdriveacls
[adminaccess|asadmin]
[teamdriveadminquery|query <QueryTeamDrive>] [matchname
<RegularExpression>]
[user|group <EmailAddress> [checkgroups]] (role|roles
<SharedDriveACLRoleList>)*
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields
<DrivePermissionsFieldNameList>)]
[shownopermissionsdrives false|true|only]
[formatjson [quotechar <Character>]]

# Tag Replace
<AddressSubfieldName> ::=
country|
countrycode|
customtype|
extendedaddress|
formatted|
locality|
pobox|
postalcode|
primary|
region|
streetaddress|
type
<EmailSubfieldName> ::=
domain|
primaryemail|
username
<KeywordSubfieldName> ::=
customtype|
type|
value
<LocationSubfieldName> ::=
area|
buildingid|
buildingname|
customtype|
deskcode|
floorname|
floorsection|
type
<NameSubfieldName> ::=
familyname|
fullname|
givenname
<OrganizationSubfieldName> ::=
costcenter|
customtype|
department|
description|
domain|
fulltimeequivalent|
location|
name|
primary|
symbol|
title|
type
<OtherEmailSubfieldName> ::=
address|
customtype|
primary|
type
<PhoneSubfieldName> ::=
customtype|
primary|
type|
value
<UserReplacementFieldSubfield> ::=
address.<AddressSubfieldName>|
email.<EmailSubfieldName>|
keyword.<KeywordSubfieldName>|
location.<LocationSubfieldName>|
name.<NameSubfieldName>|
organization.<OrganizationSubfieldName>|
otheremail.<OtherEmailSubfieldName>|
phone.<PhoneSubfieldName>
<UserReplacementFieldSubfieldMatchSubfield> ::=
address.<AddressSubfieldName>.<AddressSubfieldName>.<String>|
keyword.<KeywordSubfieldName>.<KeywordSubfieldName>.<String>|
location.<LocationSubfieldName>.<LocationSubfieldName>.<String>|

organization.<OrganizationSubfieldName>.<OrganizationSubfieldName>.<String>|
otheremail.<OtherEmailSubfieldName>.<OtherEmailSubfieldName>.<String>|
phone.<PhoneSubfieldName>.<PhoneSubfieldName>.<String>
<Tag> ::= <String>
<UserReplacement> ::=
(field:<UserReplacementFieldSubfield>)|
(field:<UserReplacementFieldSubfieldMatchSubfield>)|
(schema:<SchemaName>.<FieldName>)|
<String>

# Vault

gam create|add vaultmatter|matter [name <String>] [description <string>]


[collaborator|collaborators <EmailItemList>] [sendemails <Boolean>] [ccme
<Boolean>]
[showdetails]
gam update vaultmatter|matter <MatterItem> [name <String>] [description <string>]
[addcollaborator|addcollaborators <EmailItemList>] [removecollaborator|
removecollaborators <EmailItemList>]
gam update vaultmatter|matter <MatterItem> action close|reopen|delete|undelete
gam close vaultmatter|matter <MatterItem>
gam reopen vaultmatter|matter <MatterItem>
gam delete vaultmatter|matter <MatterItem>
gam undelete vaultmatter|matter <MatterItem>

<ValutMatterFieldName> ::=
description|
matterid|
matterpermissions|
name|
state
<VaultMatterFieldNameList> ::= "<VaultMatterFieldName>(,<VaultMatterFieldName>)*"

gam info vaultmatter|matter <MatterItem> [basic|full]


[basic|full|(fields <VaultMatterFieldNameList>)]
gam print vaultmatters|matters [todrive <ToDriveAttribute>*] [matterstate
<MatterStateList>]
[basic|full|(fields <VaultMatterFieldNameList>)]
gam show vaultmatters|matters [matterstate <MatterStateList>]
[basic|full|(fields <VaultMatterFieldNameList>)]

gam print vaultcounts [todrive <ToDriveAttributes>*]


matter <MatterItem> corpus mail|groups
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
(shareddrives|teamdrives <SharedDriveIDList>) | (rooms <RoomList>)
[scope <all_data|held_data|unprocessed_data>]
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|
<Time>] [timezone <TimeZone>]
[excludedrafts <Boolean>]
[includerooms <Boolean>]
[includeshareddrives|includeteamdrives <Boolean>] [driveversiondate <Date>|
<Time>]
[wait <Integer>]
gam print vaultcounts [todrive <ToDriveAttributes>*]
matter <MatterItem> operation <String> [wait <Integer>]

gam create vaultexport|export matter <MatterItem> [name <String>] corpus drive|


mail|groups|hangouts_chat|voice
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
(shareddrives|teamdrives <SharedDriveIDList>) | (rooms <RoomList>)
[scope <all_data|held_data|unprocessed_data>]
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|
<Time>] [timezone <TimeZone>]
[excludedrafts <Boolean>] [format mbox|pst]
[showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>]
[includerooms <Boolean>] [covereddata calllogs|textmessages|voicemails]
[includeshareddrives|includeteamdrives <Boolean>] [driveversiondate <Date>|
<Time>] [includeaccessinfo <Boolean>]
[region any|europe|us] [showdetails]
gam delete vaultexport|export <ExportItem> matter <MatterItem>
gam delete vaultexport|export <MatterItem> <ExportItem>
gam download vaultexport|export <ExportItem> matter <MatterItem>
[targetfolder <FilePath>] [targetname <FileName>] [noverify] [noextract]
[ziptostdout]
[bucketmatchpattern <RegularExpression>] [objectmatchpattern
<RegularExpression>]
gam download vaultexport|export <MatterItem> <ExportItem>
[targetfolder <FilePath>] [targetname <FileName>] [noverify] [noextract]
[ziptostdout]
[bucketmatchpattern <RegularExpression>] [objectmatchpattern
<RegularExpression>]

<VaultExportFieldName> ::=
cloudstoragesink|
createtime|
exportoptions|
id|
matterid|
name|
query|
requester|
requester.displayname|
requester.email|
stats|
stats.exportedArtifactCount|
stats.sizeinbytes|
stats.totalartifactcount|
status
<VaultExportFieldNameList> ::= "<VaultExportFieldName>(,<VaultExportFieldName>)*"

gam info vaultexport|export <ExportItem> matter <MatterItem>


[fields <VaultExportFieldNameList>] [shownames]
gam info vaultexport|export <MatterItem> <ExportItem>
[fields <VaultExportFieldNameList>] [shownames]
gam print vaultexports|exports [todrive <ToDriveAttribute>*]
[matters <MatterItemList>] [exportstatus <ExportStatusList>]
[fields <VaultExportFieldNameList>] [shownames]
[oneitemperrow]
gam show vaultexports|exports
[matters <MatterItemList>] [exportstatus <ExportStatusList>]
[fields <VaultExportFieldNameList>] [shownames]

gam create vaulthold|hold matter <MatterItem> [name <String>] corpus drive|mail|


groups|hangouts_chat
[(accounts|groups|users <EmailItemList>) | (orgunit|org|ou <OrgUnit>)]
[query <QueryVaultCorpus>]
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|
<Time>]
[includerooms <Boolean>] [covereddata calllogs|textmessages|voicemails]
[includeshareddrives|includeteamdrives <Boolean>]
[showdetails]
gam update vaulthold|hold <HoldItem> matter <MatterItem>
[([addaccounts|addgroups|addusers <EmailItemList>] [removeaccounts|
removegroups|removeusers <EmailItemList>]) | (orgunit|org|ou <OrgUnit>)]
[query <QueryVaultCorpus>]
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|
<Time>]
[includerooms <Boolean>] [covereddata calllogs|textmessages|voicemails]
[includeshareddrives|includeteamdrives <Boolean>]
[showdetails]
gam delete vaulthold|hold <HoldItem> matter <MatterItem>
gam delete vaulthold|hold <MatterItem> <HoldItem>
<VaultHoldFieldName> ::=
accounts|
accounts.acountid|
accounts.email|
accounts.firstname|
accounts.holdtime|
accounts.lastname|
corpus|
holdid|
name|
orgunit|
orgunit.holdtime|
orgunit.orgunitid|
query|
updatetime
<VaultHoldFieldNameList> ::= "<VaultHoldFieldName>(,<VaultHoldFieldName>)*"

gam info vaulthold|hold <HoldItem> matter <MatterItem>


[fields <VaultHoldFieldNameList>] [shownames]
gam info vaulthold|hold <MatterItem> <HoldItem>
[fields <VaultHoldFieldNameList>] [shownames]
gam print vaultholds|holds [todrive <ToDriveAttribute>*] [matters <MatterItemList>]
[fields <VaultHoldFieldNameList>] [shownames]
gam show vaultholds|holds [matters <MatterItemList>]
[fields <VaultHoldFieldNameList>] [shownames]

gam <UserTypeEntity> print vaultholds|holds [todrive <ToDriveAttribute>*]


gam <UserTypeEntity> show vaultholds|holds

# Users

<UserFieldName> ::=
addresses|address|
agreedtoterms|agreed2terms|
aliases|
archived|
changepasswordatnextlogin|changepassword|
creationtime|
customerid|
deletiontime|
email|emails|otheremail|otheremails|
externalids|externalid|
familyname|firstname|fullname|givenname|lastname|name|
gender|
id|
ims|im|
includeinglobaladdresslist|gal|
ipwhitelisted|
isdelegatedadmin|admin|isadmin|
ismailboxsetup|
isenforcedin2sv|is2svenforced|
isenrolledin2sv|is2svenrolled|
keyword|keywords|
language|languages|
lastlogintime|
locations|location|
noneditablealiases|aliases|nicknames|
notes|note|
organizations|organization|
orgunitpath|org|ou|
phones|phone|
posixaccounts|posix|
primaryemail|username|
recoveryemail|
recoveryphone|
relations|relation|
sshpublickeys|ssh|sshkeys|
suspended|
thumbnailphotourl|photo|photourl|
websites|website
<UserFieldNameList> ::= "<UserFieldName>(,<UserFieldName>)*"

<UserOrderByFieldName> ::=
familyname|lastname|givenname|firstname|email

<UserBasicAttribute> ::=
(archived <Boolean>)|
(changepassword|changepasswordatnextlogin <Boolean>)|
(base64-md5|base64-sha1|crypt|sha|sha1|sha-1|md5|nohash)|
(customerid <String>)|
(email|primaryemail|username <EmailAddress>)|
(firstname|givenname <String>)|
(gal|includeinglobaladdresslist <Boolean>)|
(gender clear|(female|male|unknown|(other <String>) [addressmeas
<String>]))|
(ipwhitelisted <Boolean>)|
(language clear|<LanguageList>)|
(lastname|familyname <String>)|
(note clear|([text_html|text_plain] <String>|
(file|htmlfile <FileName> [charset
<Charset>])|
(gdoc|ghtml <UserGoogleDoc>)))|
(org|ou|orgunitpath <OrgUnitPath>|<OrgUnitID>)
(password (random [<Integer>])|(uniquerandom [<Integer>])|blocklogin|
<Password>)|
(recoveryemail <EmailAddress>)|
(recoveryphone <string>)|
(suspended <Boolean>)|
(<SchemaName>.<FieldName> [scalarnonempty|
[multivalued|multivalue|value|multinonempty
[type home|other|work|(custom <String>)]]]
<String>)

<UserMultiAttribute> ::=
(address type home|other|work|(custom <String>)
[unstructured|formatted <String>]
[pobox <String>] [extendedaddress <String>] [streetaddress
<String>]
[locality <String>] [region <String>] [postalcode <String>]
[country <String>] [countrycode <String>]
notprimary|primary)|
(otheremail home|other|work|<String> <String>)|
(externalid account|customer|login_id|network|organization|<String>
<String>)|
(im type home|other|work|(custom <String>)
protocol aim|gtalk|icq|jabber|msn|net_meeting|qq|
skype|yahoo|(custom_protocol <String>) <String>
notprimary|primary)|
(keyword mission|occupation|outlook|(custom <string>) <String>)|
(location [type default|desk|<String>] area <String>
[building|buildingid <String>] [floor|floorname <String>]
[section|floorsection <String>] [desk|deskcode <String>]
endlocation)|
(organization [type domain_only|school|unknown|work] [customtype <String>]
[name <String>] [title <String>] [department <String>]
[symbol <String>] [costcenter <String>] [location <String>]
[description <String>] [domain <String>]
[fulltimeequivalent <Integer>]
notprimary|primary)|
(phone [type assistant|callback|car|company_main|grand_central|home|
home_fax|isdn|main|mobile|other|other_fax|pager|radio|telex|
tty_tdd|
work|work_fax|work_mobile|work_pager|(custom <String>)]
[value <String>]
notprimary|primary)|
(posix username <String> uid <Integer> gid <Integer> [system|systemid
<String>]
[home|homedirectory <String>] [shell <String>]
[gecos <String>] [os|operatingSystemType linux|unspecified|windows]
[primary <Boolean>] endposix)|
(relation admin_assistant|assistant|brother|child|domestic_partner|
dotted-line_manager|exec_assistant|father|friend|manager|mother|
parent|partner|referred_by|relative|sister|spouse|<String>
<String>)|
(sshkeys key <String> [expires <Integer>] endssh)|
(website app_install_page|blog|ftp|home|home_page|other|
profile|reservations|resume|work|<String> <URL>
notprimary|primary)

<UserClearAttribute> ::=
(address clear)|
(otheremail clear)|
(externalid clear)|
(im clear)|
(keyword clear)|
(location clear)|
(organization clear)|
(phone clear)|
(posix clear)|
(relation clear)|
(sshkeys clear)|
(website clear)

<UserAttribute> ::=
(json [charset <Charset>] <JSONData>)|(json file <FileName> [charset
<Charset>])|
<UserBasicAttribute>|
<UserMultiAttribute>|
<UserClearAttribute>

gam create|add user <EmailAddress> [ignorenullpassword] <UserAttribute>*


(groups [<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)*
[alias|aliases <EmailAddressList>]
[license <SKUID> [product|productid <ProductID>]]
[notify <EmailAddressList>] [subject <String>] [notifypassword <String>]
[(message|htmlmessage <String>)|(file|htmlfile <FileName> [charset
<CharSet>])|
(gdoc|ghtml <UserGoogleDoc>)] [html [<Boolean>]]
(replace <Tag> <UserReplacement>)*
[lograndompassword <FileName>]
[verifynotinvitable]

gam <UserTypeEntity> waitformailbox [retries <Number>]

gam update user <UserItem> [ignorenullpassword] <UserAttribute>* [noactionifalias]


[updateprimaryemail <RegularExpression> <EmailReplacement>]
[updateoufromgroup <FileName> [charset <CharSet>]
[columndelimiter <Character>] [quotechar <Character>]
[fields <FieldNameList>] [keyfield <FieldName>] [datafield
<FieldName>]]
[clearschema <SchemaName>] [clearschema <SchemaName>.<FieldName>]
[createifnotfound] [notfoundpassword (random [<Integer>])|blocklogin|
<Password>]
(groups [<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)*
[alias|aliases <EmailAddressList>]
[notify <EmailAddressList>] [subject <String>] [notifypassword <String>]
[(message|htmlmessage <String>)|(file|htmlfile <FileName> [charset
<CharSet>])|
(gdoc|ghtml <UserGoogleDoc>)] [html [<Boolean>]]
[notifyonupdate [<Boolean>]] [setchangepasswordoncreate [<Boolean>]]
(replace <Tag> <UserReplacement>)*
[lograndompassword <FileName>]
[verifynotinvitable]
gam delete user <UserItem> [noactionifalias]
gam undelete user <UserItem> [ou|org|orgunit <OrgUnitPath>]
gam suspend user <UserItem> [noactionifalias]
gam unsuspend user <UserItem> [noactionifalias]
gam info user [<UserItem>]
[quick]
[noaliases|aliases]
[nobuildingnames|buildingnames]
[nogroups|groups|grouptree]
[nolicenses|nolicences|licenses|licences]
[noschemas|allschemas|(schemas|custom|customschemas <SchemaNameList>)]
[userview] <UserFieldName>* [fields <UserFieldNameList>]
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
[formatjson]

gam update users <UserTypeEntity> [ignorenullpassword] <UserAttribute>*


[noactionifalias]
[updateprimaryemail <RegularExpression> <EmailReplacement>]
[updateoufromgroup <FileName> [charset <CharSet>]
[columndelimiter <Character>] [quotechar <Character>]
[fields <FieldNameList>] [keyfield <FieldName>] [datafield
<FieldName>]]
[clearschema <SchemaName>] [clearschema <SchemaName>.<FieldName>]
[createifnotfound] [notfoundpassword (random [<Integer>])|blocklogin|
<Password>]
(groups [<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)*
[alias|aliases <EmailAddressList>]
[notify <EmailAddressList>] [subject <String>] [notifypassword <String>]
[(message|htmlmessage <String>)|(file|htmlfile <FileName> [charset
<CharSet>])|
(gdoc|ghtml <UserGoogleDoc>)] [html [<Boolean>]]
[notifyonupdate [<Boolean>]] [setchangepasswordoncreate [<Boolean>]]
(replace <Tag> <UserReplacement>)*
[lograndompassword <FileName>]
[verifynotinvitable]
gam delete users <UserTypeEntity> [noactionifalias]
gam undelete users <UserEntity> [ou|org|orgunit <OrgUnitPath>]
gam suspend users <UserTypeEntity> [noactionifalias]
gam unsuspend users <UserTypeEntity> [noactionifalias]
gam info users <UserTypeEntity>
[quick]
[noaliases|aliases]
[nobuildingnames|buildingnames]
[nogroups|groups|grouptree]
[nolicenses|nolicences|licenses|licences]
[noschemas|allschemas|(schemas|custom|customschemas <SchemaNameList>)]
[userview] <UserFieldName>* [fields <UserFieldNameList>]
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
[formatjson]

gam <UserTypeEntity> update users [ignorenullpassword] <UserAttribute>*


[noactionifalias]
[updateprimaryemail <RegularExpression> <EmailReplacement>]
[updateoufromgroup <FileName> [charset <CharSet>]
[columndelimiter <Character>] [quotechar <Character>]
[fields <FieldNameList>] [keyfield <FieldName>] [datafield
<FieldName>]]
[clearschema <SchemaName>] [clearschema <SchemaName>.<FieldName>]
[createifnotfound] [notfoundpassword (random [<Integer>])|blocklogin|
<Password>]
(groups [<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)*
[alias|aliases <EmailAddressList>]
[notify <EmailAddressList>] [subject <String>] [notifypassword <String>]
[(message|htmlmessage <String>)|(file|htmlfile <FileName> [charset
<CharSet>])|
(gdoc|ghtml <UserGoogleDoc>)] [html [<Boolean>]]
[notifyonupdate [<Boolean>]] [setchangepasswordoncreate [<Boolean>]]
(replace <Tag> <UserReplacement>)*
[lograndompassword <FileName>]
[verifynotinvitable]
gam <UserTypeEntity> delete users [noactionifalias]
gam <UserEntity> undelete users [ou|org|orgunit <OrgUnitPath>]
gam <UserTypeEntity> suspend users [noactionifalias]
gam <UserTypeEntity> unsuspend users [noactionifalias]
gam <UserTypeEntity> info users
[quick]
[noaliases|aliases]
[nobuildingnames|buildingnames]
[nogroups|groups|grouptree]
[nolicenses|nolicences|licenses|licences]
[noschemas|allschemas|(schemas|custom|customschemas <SchemaNameList>)]
[userview] <UserFieldName>* [fields <UserFieldNameList>]
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
[formatjson]

Print fields for selected users; use these options to select users:
([domain <DomainName>] [(query <QueryUser>)|(queries <QueryUserList>)]
[limittoou <OrgUnitItem>] [deleted_only|only_deleted] [notsuspended|
suspended])
If none of these options are chosen, all users are selected.

gam print users [todrive <ToDriveAttribute>*]


([domain <DomainName>] [(query <QueryUser>)|(queries <QueryUserList>)]
[limittoou <OrgUnitItem>] [deleted_only|only_deleted])
[orderby <UserOrderByFieldName> [ascending|descending]]
[groups|groupsincolumns]
[license|licenses|licence|licences|licensebyuser|licensesbyuser|
licencebyuser|licencesbyuser]
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
[schemas|custom|customschemas all|<SchemaNameList>]
[emailpart|emailparts|username]
[userview] [basic|full|allfields | <UserFieldName>* | fields
<UserFieldNameList>]
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst
[<Boolean>]]
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]

Print fields for specified users.

gam print users [todrive <ToDriveAttribute>*] select <UserTypeEntity>


[orderby <UserOrderByFieldName> [ascending|descending]]
[groups|groupsincolumns]
[license|licenses|licence|licences|licensebyuser|licensesbyuser|
licencebyuser|licencesbyuser]
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
[schemas|custom|customschemas all|<SchemaNameList>]
[emailpart|emailparts|username]
[userview] [basic|full|allfields | <UserFieldName>* | fields
<UserFieldNameList>]
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst
[<Boolean>]]
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]

gam <UserTypeEntity> print users [todrive <ToDriveAttribute>*]


[orderby <UserOrderByFieldName> [ascending|descending]]
[groups|groupsincolumns]
[license|licenses|licence|licences|licensebyuser|licensesbyuser|
licencebyuser|licencesbyuser]
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
[schemas|custom|customschemas all|<SchemaNameList>]
[emailpart|emailparts|username]
[userview] [basic|full|allfields | <UserFieldName>* | fields
<UserFieldNameList>]
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst
[<Boolean>]]
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]

The first column will always be primaryEmail; the remaining field names will be
sorted if allfields, basic, full or sortheaders is specified;
otherwise, the remaining field names will appear in the order specified.

Print no header row and primaryEmail for specified users.

gam <UserTypeEntity> print


gam <UserTypeEntity> print users

Print user domain counts for selected users; use these options to select users:
([domain <DomainName>] [(query <QueryUser>)|(queries <QueryUserList>)]
[limittoou <OrgUnitItem>] [deleted_only|only_deleted])
If none of these options are chosen, all users are selected.

gam print users [todrive <ToDriveAttribute>*]


([domain <DomainName>] [(query <QueryUser>)|(queries <QueryUserList>)]
[limittoou <OrgUnitItem>] [deleted_only|only_deleted])
[formatjson [quotechar <Character>]] [countsonly|countonly]
[issuspended <Boolean>]

Print user domain counts for specified users.

gam print users [todrive <ToDriveAttribute>*] select <UserTypeEntity>


[formatjson [quotechar <Character>]] [countsonly|countonly]

gam <UserTypeEntity> print users [todrive <ToDriveAttribute>*]


[formatjson [quotechar <Character>]] [countsonly|countonly]
[issuspended <Boolean>]

# Users - Application Specific Passwords/backup Codes

gam <UserTypeEntity> delete asps|applicationspecificpasswords all|<ASPIDList>


gam <UserTypeEntity> show asps|applicationspecificpasswords
gam <UserTypeEntity> print asps|applicationspecificpasswords [todrive
<ToDriveAttribute>*]
[oneitemperrow]

gam <UserTypeEntity> update backupcodes|verificationcodes


gam <UserTypeEntity> delete backupcodes|verificationcodes
gam <UserTypeEntity> show backupcodes|verificationcodes
gam <UserTypeEntity> print backupcodes|verificationcodes [todrive
<ToDriveAttribute>*]
[delimiter <Character>]

# Users - Calendars

<CalendarACLRole> ::=
editor|freebusy|freebusyreader|owner|reader|writer

<CalendarSelectProperty> ::=
(minaccessrole <CalendarACLRole>)|
showdeleted|
showhidden

<UserCalendarAddEntity> ::=
<EmailAddress>|
<UniqueID>|
(courses <CourseIDList>)|
((courses_with_teacher <UserItem>)|my_courses_as_teacher [coursestates
<CourseStateList>])|
((courses_with_student <UserItem>)|my_courses_as_student [coursestates
<CourseStateList>])|
(resource <ResourceID>)|
(resources <ResourceIDList>)|
((calendars <CalendarList>) | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVDataSelector>)

<UserCalendarEntity> ::=
allcalendars|
primary|
<EmailAddress>|
<UniqueID>|
(courses <CourseIDList>)|
((courses_with_teacher <UserItem>)|my_courses_as_teacher [coursestates
<CourseStateList>])|
((courses_with_student <UserItem>)|my_courses_as_student [coursestates
<CourseStateList>])|
(coursestates <CourseStateList>)|
(resource <ResourceID>)|
(resources <ResourceIDList>)|
((calendars <CalendarList>) | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVDataSelector>)|
<CalendarSelectProperty>*

<CalendarACLScope> ::=
<EmailAddress>|user:<EmailAdress>|group:<EmailAddress>|domain:<DomainName>|
domain|default
<CalendarACLScopeList> ::=
<CalendarACLScope>(,<CalendarACLScope>)*
<CalendarACLScopeEntity> ::=
<CalendarACLScopeList> | <FileSelector> | <CSVFileSelector> |
<CSVkmdSelector> | <CSVDataSelector>

<CalendarEmailNotificatonEventType> ::=
eventcreation|eventchange|eventcancellation|eventresponse|agenda
<CalendarEmailNotificatonEventTypeList> ::=

"<CalendarEmailNotificatonEventType>(,<CalendarEmailNotificatonEventType>)*"

<CalendarAttribute> ::=
(backgroundcolor <ColorValue>)|
(color <CalendarColorName>)|
(colorindex|colorid <CalendarColorIndex>)|
(foregroundcolor <ColorValue>)|
(hidden <Boolean>)|
(notification clear|(email <CalendarEmailNotificatonEventTypeList>))|
(reminder clear|(email|pop <Number>)|(<Number> email|pop))|
(selected <Boolean>)|
(summary <String>)

<CalendarSettings> ::=
(description <String>)|
(location <String>)|
(summary <String>)|
(timezone <TimeZone>)

Manage a users list of calendars

gam <UserTypeEntity> add calendars <UserCalendarAddEntity> <CalendarAttribute>*


gam <UserTypeEntity> update calendars <UserCalendarEntity> <CalendarAttribute>+
gam <UserTypeEntity> delete calendars <UserCalendarEntity>

gam <UserTypeEntity> info calendars <UserCalendarEntity> [formatjson]


gam <UserTypeEntity> show calendars [permissions]
[primary] <CalendarSelectProperty>* [noprimary] [nogroups] [noresources]
[nosystem] [nousers]
[formatjson]
gam <UserTypeEntity> print calendars [todrive <ToDriveAttribute>*] [permissions]
[primary] <CalendarSelectProperty>* [noprimary] [nogroups] [noresources]
[nosystem] [nousers]
[formatjson] [delimiter <Character>] [quotechar <Character>]

gam <UserTypeEntity> show calsettings [formatjson]


gam <UserTypeEntity> print calsettings [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

Create, modify and remove calendars for a user

gam <UserTypeEntity> create calendar <CalendarSettings>+


gam <UserTypeEntity> modify calendars <UserCalendarEntity> <CalendarSettings>+
gam <UserTypeEntity> remove calendars <UserCalendarEntity>

Manage access to any calendar a user owns

gam <UserTypeEntity> create|add calendaracls <UserCalendarEntity> <CalendarACLRole>


<CalendarACLScopeEntity> [sendnotifications <Boolean>]
gam <UserTypeEntity> update calendaracls <UserCalendarEntity> <CalendarACLRole>
<CalendarACLScopeEntity> [sendnotifications <Boolean>]
gam <UserTypeEntity> delete calendaracls <UserCalendarEntity> <CalendarACLRole>]
<CalendarACLScopeEntity>

gam <UserTypeEntity> info calendaracls <UserCalendarEntity>


<CalendarACLScopeEntity> [formatjson]
gam <UserTypeEntity> show calendaracls <UserCalendarEntity> [formatjson]
gam <UserTypeEntity> print calendaracls <UserCalendarEntity> [todrive
<ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

Transfer ownership of a selection of users calendars to another user

gam <UserTypeEntity> transfer calendars <UserItem> <UserCalendarEntity>


[keepuser | (retainrole <CalendarACLRole>)] [sendnotifications <Boolean>]
[noretentionmessages]
<CalendarSettings>] [append description|location|summary]
[noupdatemessages]
gam <UserTypeEntity> transfer seccals <UserItem> [keepuser] [sendnotifications
<Boolean>]

<AttendeeAttendance> ::= optional|required


<AttendeeStatus> ::= accepted|declined|needsaction|tentative

<EventSelectProperty> ::=
(after|start|starttime|timemin <Time>)|
(before|end|endtime|timemax <Time>)|
(query <QueryCalendar>)|
(privateextendedproperty <String>)|
(sharedextendedproperty <Syting>)|
showdeletedevents|
showhiddeninvitations|
singleevents|
(updatedmin <Time>)

<EventMatchProperty> ::=
(matchfield attendees <EmailAddressEntity>)|
(matchfield attendeespattern <RegularExpression>)|
(matchfield attendeesstatus [<AttendeeAttendance>] [<AttendeeStatus>]
<EmailAddressEntity>)|
(matchfield creatoremail <RegularExpression>)|
(matchfield creatorname <RegularExpression>)|
(matchfield description <RegularExpression>)|
(matchfield hangoutlink <RegularExpression>)|
(matchfield location <RegularExpression>)|
(matchfield organizeremail <RegularExpression>)|
(matchfield organizername <RegularExpression>)|
(matchfield summary <RegularExpression>)

<EventEntity> ::=
(id|eventid <EventId>)|(event|events <EventIdList> | <FileSelector> |
<CSVFileSelector> | <CSVkmdSelector> | <CSVSubkeySelector> | <CSVDataSelector>)|
(<EventSelectProperty>+ <EventMatchProperty>*)

<AttendeeAttendance> ::= optional|required


<AttendeeStatus> ::= accepted|declined|needsaction|tentative

<EventAttribute> ::=
(anyonecanaddself [<Boolean>])|
(attachment <String> <URL>)|
(attendee <EmailAddress>)|
(attendeestatus [<AttendeeAttendance>] [<AttendeeStatus>] <EmailAddress>)|
available|
(color <EventColorName>)|
(colorindex|colorid <EventColorIndex>))|
(description <String>)|
(end|endtime (allday <Date>)|<Time>)|
(guestscaninviteothers <Boolean>)|
guestscantinviteothers|
(guestscanmodify <Boolean>)|
(guestscanseeotherguests <Boolean>)|
guestscantseeotherguests|
hangoutsmeet|
(json [charset <Charset>] <JSONData>)|
(json file <FileName> [charset <Charset>])|
(jsonattendees [charset <Charset>] <JSONData>)|(jsonattendees file
<FileName> [charset <Charset>])|
(location <String>)|
(noreminders|(reminder email|popup <Number>))|
(optionalattendee <EmailAddress>)|
(originalstart|originalstarttime (allday <Date>)|<Time>)|
(privateproperty <PropertyKey> <PropertyValue>)|
(recurrence <RRULE, EXRULE, RDATE and EXDATE line>)|
(reminder <Number> email|popup))|
(selectattendees [<AttendeeAttendance>] [<AttendeeStatus>]
<UserTypeEntity>)|
(sequence <Integer>)|
(sharedproperty <PropertyKey> <PropertyValue>)|
(source <String> <URL>)|
(start|starttime (allday <Date>)|<Time>)|
(status confirmed|tentative|cancelled)|
(summary <String>)|
tentative|
(timezone <TimeZone>)|
(transparency opaque|transparent)|
(visibility default|public|private)

The following attributes are equivalent:


available - transparency transparent
guestscantinviteothers - guestscaninviteothers False
guestscantseeothers - guestscanseeotherguests False
tentative - status tentative

<EventImportAttribute> ::=
<EventAttribute>|
(organizername <String>)|
(organizeremail <EmailAddress>)

<EventUpdateAttribute> ::=
<EventAttribute>|
clearattachments|
clearattendees|
clearhangoutsmeet|
(clearprivateproperty <PropertyKey>)|
(clearsharedproperty <PropertyKey>)|
(removeattendee <EmailAddress>)|
(replacedescription <RegularExpression> <String>)|
(selectremoveattendees <UserTypeEntity>)

<EventNotificationAttribute> ::=
notifyattendees|(sendnotifications <Boolean>)|(sendupdates all|
enternalonly|none)

The following attributes are equivalent:


notifyattendees - sendupdates all
sendnotifications false - sendupdates none
sendnotifications true - sendupdates all

Add update and delete events in any calendar for which a user has access

gam <UserTypeEntity> create|add event <UserCalendarEntity> [id <String>]


<EventAttribute>+ [<EventNotificationAttribute>]
gam <UserTypeEntity> import event <UserCalendarEntity> icaluid <iCalUID>
<EventImportAttribute>+
gam <UserTypeEntity> update events <UserCalendarEntity> [<EventEntity>]
[replacemode] <EventUpdateAttribute>+ [<EventNotificationAttribute>]
gam <UserTypeEntity> delete events <UserCalendarEntity> [<EventEntity>] [doit]
[<EventNotificationAttribute>]
gam <UserTypeEntity> purge events <UserCalendarEntity> [<EventEntity>] [doit]
[<EventNotificationAttribute>]
gam <UserTypeEntity> wipe events <UserCalendarEntity>
gam <UserTypeEntity> move events <UserCalendarEntity> [<EventEntity>] destination|
to <CalendarItem> [<EventNotificationAttribute>]
gam <UserTypeEntity> empty calendartrash <UserCalendarEntity>

<EventDisplayProperty> ::=
(alwaysincludeemail)|
(icaluid <String>)|
(maxattendees <Integer>)|
(orderby starttime|updated)|
(timezone <TimeZone>)

gam <UserTypeEntity> info events <UserCalendarEntity> [<EventEntity>] [maxinstances


<Number>]
[fields <EventFieldNameList>] [showdayofweek]
[formatjson]
gam <UserTypeEntity> show events <UserCalendarEntity> [<EventSelectEntity>]
<EventDisplayProperty>*
[fields <EventFieldNameList>] [showdayofweek]
[countsonly]
[formatjson]
gam <UserTypeEntity> print events <UserCalendarEntity> [<EventSelectEntity>]
<EventDisplayProperty>*
[fields <EventFieldNameList>] [showdayofweek]
[countsonly]
[formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]

gam <UserTypeEntity> update calattendees <UserCalendarEntity> <EventEntity>


[anyorganizer]
[<EventNotificationAttribute>] [splitupdate] [doit]
(csv <FileName>|(gsheet <UserGoogleSheet>)(gdoc <UserGoogleDoc>))*
(delete <EmailAddress>)*
(deleteentity <EmailAddressEntity>)*
(add <EmailAddress>)*
(addentity <EmailAddressEntity>)*
(addstatus [<AttendeeAttendance>] [<AttendeeStatus>] <EmailAddress>)*
(addentitystatus [<AttendeeAttendance>] [<AttendeeStatus>]
<EmailAddressEntity>)*
(replace <EmailAddress> <EmailAddress>)*
(replacestatus [<AttendeeAttendance>] [<AttendeeStatus>] <EmailAddress>
<EmailAddress>)*
(updatestatus [<AttendeeAttendance>] [<AttendeeStatus>] <EmailAddress>)*
(updateentitystatus [<AttendeeAttendance>] [<AttendeeStatus>]
<EmailAddressEntity>)*

# Users - Data Studuo

<DataStudioPermission> ::=
user:<EmailAddress>|
group:<emailAddress>|
domain:<DomainName>|
serviceAccount:<EmailAddress>
<DataStudioPermissionList> ::= "<DataStudioPermission>(,<DataStudioPermission>)*"
<DataStudioPermissionEntity> ::= <DataStudioPermissionList> | <FileSelector> |
<CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>

gam <UserTypeEntity> print datastudioassets [todrive <ToDriveAttribute>*]


[([assettype report|datasource|all] [title <String>]
[owner <Emailddress>] [includetrashed]
[orderby title [ascending|descending]]) |
(assetids <DataStudioAssetIDEntity>)]
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> show datastudioassets
[([assettype report|datasource|all] [title <String>]
[owner <Emailddress>] [includetrashed]
[orderby title [ascending|descending]]) |
(assetids <DataStudioAssetIDEntity>)]
[formatjson]

gam <UserTypeEntity> add datastudiopermissions


[([assettype report|datasource|all] [title <String>]
[owner <Emailddress>] [includetrashed]
[orderby title [ascending|descending]]) |
(assetids <DataStudioAssetIDEntity>)]
(role editor|viewer <DataStudioPermissionEntity>)+
[nodetails]
gam <UserTypeEntity> delete datastudiopermissions
[([assettype report|datasource|all] [title <String>]
[owner <Emailddress>] [includetrashed]) |
(assetids <DataStudioAssetIDEntity>)]
(role any <DataStudioPermissionEntity>)+
[nodetails]
gam <UserTypeEntity> update datastudiopermissions
[([assettype report|datasource|all] [title <String>]
[owner <Emailddress>] [includetrashed]
[orderby title [ascending|descending]]) |
(assetids <DataStudioAssetIDEntity>)]
(role editor|viewer <DataStudioPermissionEntity>)+
[nodetails]

gam <UserTypeEntity> print datastudiopermissions [todrive <ToDriveAttribute>*]


[([assettype report|datasource|all] [title <String>]
[owner <Emailddress>] [includetrashed]
[orderby title [ascending|descending]]) |
(assetids <DataStudioAssetIDEntity>)]
[role editor|owner|viewer]
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> show datastudiopermissions
[([assettype report|datasource|all] [title <String>]
[owner <Emailddress>] [includetrashed]
[orderby title [ascending|descending]]) |
(assetids <DataStudioAssetIDEntity>)]
[role editor|owner|viewer]
[formatjson]

# Users - Drive

<DriveFileOrderByFieldName> ::=
createddate|createdtime|
folder|
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
modifieddate|modifiedtime|
name|
name_natural|
quotabytesused|quotaused|
recency|
sharedwithmedate|sharedwithmetime|
starred|
title|
title_natural|
viewedbymedate|viewedbymetime

<DriveFileIDEntity> ::=
<DriveFileItem> |
(id <DriveFileItem>) | (id:<DriveFileItem>) |
(ids <DriveFileList>) | (ids:<DriveFileList>)
<DriveFileNameEntity> ::=
(anyname <DriveFileName>) | (anyname:<DriveFileName>) |
(anydrivefilename <DriveFileName>) | (anydrivefilename:<DriveFileName>) |
(name <DriveFileName>) | (name:<DriveFileName>) |
(drivefilename <DriveFileName>) | (drivefilename:<DriveFileName>) |
(othername <DriveFileName>) | (othername:<DriveFileName>) |
(otherdrivefilename <DriveFileName>) | (otherdrivefilename:<DriveFileName>)
<DriveFileQueryEntity> ::=
(query <QueryDriveFile>) | (query:<QueryDriveFile>) |
(fullquery <QueryDriveFile>)
<DriveFileEntity> ::=
<DriveFileIDEntity> |
<DriveFileNameEntity> |
<DriveFileQueryEntity> |
<DriveFileQueryShortcut> |
root | mydrive |
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> |
<CSVSubkeySelector>) | <CSVDataSelector>)

<DriveFileAttribute> ::=
(contentrestrictions readonly false)|
(contentrestrictions readonly true [reason <String>])|
(copyrequireswriterpermission [<Boolean>])|
(description <String>)|
(folderColorRgb <ColorValue>)|
(indexabletext <String>)|
(keeprevisionforever|pinned)|
(lastviewedbyme <Time>)|
(localfile <FileName>|-)|
(mimetype <MimeType>)|
(ocrlanguage <Language>)|
(preservefiletimes [<Boolean>])|
(privateproperty <PropertyKey> <PropertyValue>)|
(publicproperty <PropertyKey> <PropertyValue>)|
(property <PropertyKey> <PropertyValue> [private|public])|
(restricted|restrict [<Boolean>])|
(securityupdate [<Boolean>])|
(shortcut <DriveFileID>)|
(starred|star [<Boolean>])|
(trashed|trash [<Boolean>])|
(viewed|view [<Boolean>])|
(viewerscancopycontent [<Boolean>])|
(writerscanshare|writerscantshare [<Boolean>])

<DriveFileParentAttribute> ::=
(parentid <DriveFolderID>)|
(parentname <DriveFolderName>)|
(anyownerparentname <DriveFolderName>)|
(teamdriveparentid <DriveFolderID>)|
(teamdriveparent <SharedDriveName>)|
(teamdriveparentid <SharedDriveID> teamdriveparentname <DriveFolderName>)|
(teamdriveparent <SharedDriveName> teamdriveparentname <DriveFolderName>))|
(teamdriveparentid <DriveFolderID>)|(teamdriveparent <SharedDriveName>)|
(teamdriveparentid <SharedDriveID> teamdriveparentname <DriveFolderName>)|
(teamdriveparent <SharedDriveName> teamdriveparentname <DriveFolderName>)

<DriveFileCreateAttribute> ::=
<DriveFileAttribute>|
<DriveFileParentAttribute>|
(createddate|createdtime <Time>)|
(modifieddate|modifiedtime <Time>)|
ignoredefaultvisibility|
usecontentasindexabletext

gam <UserTypeEntity> create|add drivefile


[localfile <FileName>|-]
[(drivefilename <DriveFileName>) | (replacefilename <RegularExpression>
<String>)*]
[stripnameprefix <String>]
<DriveFileCreateAttribute>*
[(csv [todrive <ToDriveAttribute>*] (addcsvdata <FieldName> currenttime|
<String>)*) |
(returnidonly|returnlinkonly|returneditlinkonly|showdetails)]

<DriveFileUpdateAttribute> ::=
<DriveFileAttribute>|
<DriveFileParentAttribute>|
(modifieddate|modifiedtime <Time>)|
usecontentasindexabletext|
((addparents <DriveFolderIDList>)|
(addparentname <DriveFolderName>)|
(addanyownerparentname <DriveFolderName>))|
((removeparents <DriveFolderIDList>)|
(removeparentname <DriveFolderName>)|
(removeanyownerparentname <DriveFolderName>))

gam <UserTypeEntity> update drivefile <DriveFileEntity> [copy] [returnidonly|


returnlinkonly]
[localfile <FileName>|-]
[retainname | (newfilename <DriveFileName>) | (replacefilename
<RegularExpression> <String>)*]
[stripnameprefix <String>]
<DriveFileUpdateAttribute>*
[(gsheet|csvsheet <SheetEntity> [clearfilter])|(addsheet <String>)]
[charset <CharSet>] [columndelimiter <Character>]

<DriveFileCopyAttribute> ::=
(contentrestrictions readonly false)|
(contentrestrictions readonly true [reason <String>])|
(copyrequireswriterpermission [<Boolean>])|
(description <String>)|
ignoredefaultvisibility|
(keeprevisionforever|pinned)|
(lastviewedbyme <Time>)|
(modifieddate|modifiedtime <Time>)|
(mimetype <MimeType>)|
(ocrlanguage <Language>)|
(privateproperty <PropertyKey> <PropertyValue>)|
(publicproperty <PropertyKey> <PropertyValue>)|
(property <PropertyKey> <PropertyValue> [private|public])|
(viewerscancopycontent [<Boolean>])|
(writerscanshare|writerscantshare [<Boolean>])

gam <UserTypeEntity> copy drivefile <DriveFileEntity>


[newfilename <DriveFileName>] (replacefilename <RegularExpression>
<String>)*
[stripnameprefix <String>]
[excludetrashed] [returnidonly|returnlinkonly]
[summary [<Boolean>]] [showpermissionmessages [<Boolean>]]
[<DriveFileParentAttribute>]
[mergewithparent [<Boolean>]] [recursive [depth <Number>]]
[copysubfiles [<Boolean>]] [filenamematchpattern <RegularExpression>]
[filemimetype [not] <MimeTypeList>]
[copysubfolders [<Boolean>]] [foldernamematchpattern <RegularExpression>]
[copysubshortcuts [<Boolean>]] [shortcutnamematchpattern
<RegularExpression>]
<DriveFileCopyAttribute>*
[duplicatefiles overwriteolder|overwriteall|duplicatename|uniquename|skip]
[duplicatefolders merge|duplicatename|uniquename|skip]
[copiedshortcutspointtocopiedfiles [<Boolean>]]
[copyfilepermissions [<Boolean>]]
[copyfileinheritedpermissions [<Boolean>]
[copyfilenoninheritedpermissions [<Boolean>]
[copymergewithparentfolderpermissions [<Boolean>]]
[copymergedtopfolderpermissions [<Boolean>]]
[copytopfolderpermissions [<Boolean>]]
[copytopfolderiheritedpermissions [<Boolean>]]
[copytopfoldernoniheritedpermissions never|always|syncallfolders|
syncupdatedfolders]
[copymergedsubfolderpermissions [<Boolean>]]
[copysubfolderpermissions [<Boolean>]]
[copysubfolderinheritedpermissions [<Boolean>]]
[copysubfoldernoniheritedpermissions never|always|syncallfolders|
syncupdatedfolders]
[excludepermissionsfromdomains <DomainNameList>]
(mappermissionsdomain <DomainName> <DomainName>)*
[copysheetprotectedranges [<Boolean>]]
[copysheetprotectedrangesinheritedpermissions [<Boolean>]]
[copysheetprotectedrangesnoninheritedpermissions [<Boolean>]]
[sendemailifrequired [<Boolean>]]

gam <UserTypeEntity> move drivefile <DriveFileEntity> [newfilename <DriveFileName>]


[summary [<Boolean>]] [showpermissionmessages [<Boolean>]]
[<DriveFileParentAttribute>]
[mergewithparent|mergewithparentretain [<Boolean>]]
[createshortcutsfornonmovablefiles [<Boolean>]]
[duplicatefiles overwriteolder|overwriteall|duplicatename|uniquename|skip]
[duplicatefolders merge|duplicatename|uniquename|skip]
[copymergewithparentfolderpermissions [<Boolean>]]
[copymergedtopfolderpermissions [<Boolean>]]
[copytopfolderpermissions [<Boolean>]]
[copytopfolderiheritedpermissions [<Boolean>]]
[copytopfoldernoniheritedpermissions never|always|syncallfolders|
syncupdatedfolders]
[copymergedsubfolderpermissions [<Boolean>]]
[copysubfolderpermissions [<Boolean>]]
[copysubfolderinheritedpermissions [<Boolean>]]
[copysubfoldernoniheritedpermissions never|always|syncallfolders|
syncupdatedfolders]
[excludepermissionsfromdomains <DomainNameList>]
(mappermissionsdomain <DomainName> <DomainName>)*
[retainsourcefolders [<Boolean>]]
[sendemailifrequired [<Boolean>]]

gam <UserTypeEntity> get document <DriveFileEntity>


[viewmode default|suggestions_inline|preview_suggestions_accepted|
preview_without_suggestions]
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]

gam <UserTypeEntity> get drivefile <DriveFileEntity> [revision


<DriveFileRevisionID>]
[(format <FileFormatList>)|(gsheet|csvsheet <SheetEntity>)]
[exportsheetaspdf <String>]
[targetfolder <FilePath>] [targetname <FileName>|-] [overwrite [<Boolean>]]
[showprogress [<Boolean>]]

gam <UserTypeEntity> delete drivefile <DriveFileEntity> [purge|untrash|trash]


gam <UserTypeEntity> purge drivefile <DriveFileEntity>
gam <UserTypeEntity> trash drivefile <DriveFileEntity>
gam <UserTypeEntity> untrash drivefile <DriveFileEntity>

gam <UserTypeEntity> info drivefile <DriveFileEntity>


[filepath|fullpath] [allfields|<DriveFieldName>*|(fields
<DriveFieldNameList>)]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[showdrivename] [showshareddrivepermissions]
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
[showparentsidsaslist]
[stripcrsfromname]
[formatjson]

gam <UserTypeEntity> create|add drivefileshortcut <DriveFileEntity> [shortcutname


<String>]
[<DriveFileParentAttribute>|convertparents]
[csv [todrive <ToDriveAttribute>*]] [returnidonly]

gam <UserTypeEntity> check drivefileshortcut <DriveFileEntity>


[csv [todrive <ToDriveAttribute>*]]

<DriveFileACLRole> ::=
commenter|
contentmanager|fileorganizer|
contributor|editor|writer|
manager|organizer|owner|
reader|viewer
<DriveFilePermission> ::= anyone|anyonewithlink|user:<EmailAddress>|
group:<EmailAddress>|domain:<DomainName>|
domainwithlink:<DomainName>;<DriveFileACLRole>
<DriveFilePermissionID> ::= anyone|anyonewithlink|id:<String>
<DriveFilePermissionIDorEmail> ::= <DriveFilePermissionID>|<EmailAddress>
<DriveFilePermissionList> ::= "<DriveFilePermission>(,<DriveFilePermission)*"
<DriveFilePermissionIDList> ::=
"<DriveFilePermissionID>(,<DriveFilePermissionID>)*"

<DriveFilePermissionEntity> ::=
<DriveFilePermissionList> |
(json [charset <Charset>] <JSONData>)|(json file <FileName> [charset
<Charset>]) |
<FileSelector> |
<CSVFileSelector> |
<CSVkmdSelector> |
<CSVDataSelector>
<DriveFilePermissionIDEntity> ::=
<DriveFilePermissionIDList> |
(json [charset <Charset>] <JSONData>)|(json file <FileName> [charset
<Charset>]) |
<FileSelector> |
<CSVFileSelector> |
<CSVkmdSelector> |
<CSVDataSelector>

<DrivePermissionsFieldName> ::=
additionalroles|
allowfilediscovery|
deleted|
permissiondetails|
displayname|
domain|
emailaddress|
expirationdate|
expirationtime|
id|
name|
photolink|
role|
type|
withlink
<DrivePermissionsFieldNameList> ::=
"<DrivePermissionsFieldName>(,<DrivePermissionsFieldName>)*"

gam <UserTypeEntity> create|add drivefileacl <DriveFileEntity> [adminaccess|


asadmin]
anyone|(user <UserItem>)|(group <GroupItem>)|(domain <DomainName>) (role
<DriveFileACLRole>)
[withlink|(allowfilediscovery|discoverable [<Boolean>])] [expiration
<Time>]
[sendemail] [emailmessage <String>]
[showtitles] [nodetails|(csv [todrive <ToDriveAttribute>*] [formatjson
[quotechar <Character>]])]
gam <UserTypeEntity> update drivefileacl <DriveFileEntity>
<DriveFilePermissionIDorEmail>
(role <DriveFileACLRole>) [expires|expiration <Time>] [removeexpiration
[<Boolean>]]
[showtitles] [nodetails|(csv [todrive <ToDriveAttribute>*] [formatjson
[quotechar <Character>]])]
gam <UserTypeEntity> delete drivefileacl <DriveFileEntity>
<DriveFilePermissionIDorEmail>
[showtitles]
gam <UserTypeEntity> info drivefileacl <DriveFileEntity>
<DriveFilePermissionIDorEmail>
[showtitles]
[formatjson]
gam <UserTypeEntity> show drivefileacls <DriveFileEntity>
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[includepermissionsforview published]
[showtitles] [<DrivePermissionsFieldName>*|(fields
<DrivePermissionsFieldNameList>)]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[formatjson]
gam <UserTypeEntity> print drivefileacls <DriveFileEntity> [todrive
<ToDriveAttribute>*]
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
[includepermissionsforview published]
[oneitemperrow] [showtitles] [<DrivePermissionsFieldName>*|(fields
<DrivePermissionsFieldNameList>)]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> create|add permissions <DriveFileEntity>
<DriveFilePermissionEntity>
[expires|expiration <Time>] [sendemail] [emailmessage <String>]
[movetonewownersroot [<Boolean>]]
<PermissionMatch>* [<PermissionMatchAction>]
gam <UserTypeEntity> delete permissions <DriveFileEntity>
<DriveFilePermissionIDEntity>
<PermissionMatch>* [<PermissionMatchAction>]
gam [<UserTypeEntity>] info drivelabels <DriveLabelNameEntity>
[[basic|full] [languagecode <LanguageCode>]
[formatjson] [adminaccess|asadmin]

gam [<UserTypeEntity>] print drivelabels> [todrive <ToDriveAttribute>*]


[basic|full] [languagecode <LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
gam [<UserTypeEntity>] show drivelabels
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
[formatjson] [adminaccess|asadmin]

gam <UserTypeEntity> process filedrivelabels <DriveFileEntity>


(addlabel <DriveLabelIDList>)*
(deletelabel <DriveLabelIDList>)*
(addlabelfield <DriveLabelID> <DriveLabelFieldID>
(text <String>)|selection <DriveLabelSelectionIDList>)|
(integer <Number>)|(date <Date>)|(user <EmailAddressList>))*
(deletelabelfield <DriveLabelID> <DriveLabelFieldID>)*
[nodetails]

gam show ownership <DriveFileID>|(drivefilename <DriveFileName>) [formatjson]


gam print ownership <DriveFileID>|(drivefilename <DriveFileName>) [todrive
<ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

<RevisionsFieldName> ::=
filesize|
id|
keepforever|
lastmodifyinguser|
lastmodifyingusername|
md5checksum|
mimetype|
modifieddate|
modifiedtime|
originalfilename|
pinned|
publishauto|
published|
publishedoutsidedomain|
size
<RevisionsFieldNameList> ::= "<RevisionsFieldName>(,<RevisionsFieldName>)*"

gam <UserTypeEntity> delete filerevisions <DriveFileEntity> select


<DriveFileRevisionIDEntity>
[previewdelete] [showtitles] [doit] [max_to_delete <Number>]
gam <UserTypeEntity> update filerevisions <DriveFileEntity> select
<DriveFileRevisionIDEntity>
[published [<Boolean>]] [publishauto [<Boolean>]] [publishedoutsidedomain
[<Boolean>]]
[previewupdate] [showtitles] [doit] [max_to_update <Number>]

gam <UserTypeEntity> show filerevisions <DriveFileEntity>


[select <DriveFileRevisionIDEntity>]
[previewdelete] [showtitles]
[<RevisionsFieldName>*|(fields <RevisionsFieldNameList>)]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[stripcrsfromname]
gam <UserTypeEntity> print filerevisions <DriveFileEntity> [todrive
<ToDriveAttribute>*]
[select <DriveFileRevisionIDEntity>]
[previewdelete] [showtitles] [oneitemperrow]
[<RevisionsFieldName>*|(fields <RevisionsFieldNameList>)]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[stripcrsfromname]

gam <UserTypeEntity> transfer ownership <DriveFileEntity> <UserItem>


[<DriveFileParentAttribute>] [includetrashed] [norecursion [<Boolean>]]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[preview] [filepath] [buildtree] [todrive <ToDriveAttribute>*]
gam <UserTypeEntity> claim ownership <DriveFileEntity>
[<DriveFileParentAttribute>] [includetrashed]
[skipids <DriveFileEntity>] [skipusers <UserTypeEntity>] [subdomains
<DomainNameEntity>]
[restricted [<Boolean>]] [writerscanshare|writerscantshare [<Boolean>]]
[keepuser | (retainrole commenter|reader|writer|editor|fileorganizer|none)]
[noretentionmessages]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[preview] [filepath] [buildtree] [todrive <ToDriveAttribute>*]

gam <UserTypeEntity> transfer drive <UserItem> [select <DriveFileEntity>]


[(targetfolderid <DriveFolderID>)|(targetfoldername <DriveFolderName>)]
[targetuserfoldername <DriveFolderName>] [targetuserorphansfoldername
<DriveFolderName>]
[mergewithtarget [<Boolean>]]
[skipids <DriveFileEntity>]
[keepuser | (retainrole reader|commenter|writer|editor|fileorganizer|none)]
[noretentionmessages]
[nonowner_retainrole reader|commenter|writer|editor|fileorganizer|current|
none]
[nonowner_targetrole reader|commenter|writer|editor|fileorganizer|current|
none|source]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[preview] [todrive <ToDriveAttribute>*]

gam <UserTypeEntity> collect orphans


[(targetuserfoldername <DriveFolderName>)|(targetuserfolderid
<DriveFolderID>)]
[useshortcuts [<Boolean>]]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[preview [todrive <ToDriveAttribute>*]]

<DriveCapabilitiesSubfieldName> ::=
canaddchildren|
canaddmydriveparent|
canchangecopyrequireswriterpermission|
canchangeviewerscancopycontent|
cancomment|
cancopy|
candelete|
candownload|
canedit|
canlistchildren|
canmodifycontent|
canmovechildrenoutofdrive|
canmovechildrenoutofteamdrive|
canmovechildrenwithindrive|
canmovechildrenwithinteamdrive|
canmoveitemintoteamdrive|
canmoveitemoutofdrive|
canmoveitemoutofteamdrive|
canmoveitemwithindrive|
canmoveitemwithinteamdrive|
canmoveteamdriveitem|
canreaddrive|
canreadrevisions|
canreadteamdrive|
canremovechildren|
canremovemydriveparent|
canrename|
canshare|
cantrash|
cantrashchildren|
canuntrash

<DriveContentRestrictionsSubfieldName> ::=
readonly|
reason|
restrictinguser|
restrictiontime|
type

<DriveLabelInfoSubfieldName> ::=
labels.id| # modifiedByMe
labels.revisionid| # copyRequiresWriterPermission
labels.fields # viewedByMe

<DriveLabelsSubfieldName> ::=
labels.modified| # modifiedByMe
labels.restricted| # copyRequiresWriterPermission
labels.starred| # starred
labels.trashed| # trashed
labels.viewed # viewedByMe

<DriveOwnersSubfieldName> ::=
owners.displayname|
owners.emailaddress|
owners.isauthenticateduser|
owners.me|
owners.permissionid|
owners.photolink|
owners.picture

<DriveParentsSubfieldName> ::=
parents.id|
parents.isroot

<DrivePermissionsSubfieldName> ::=
permissions.additionalroles|
permissions.allowfilediscovery|
permissions.deleted|
permissions.permissiondetails|
permissions.displayname|
permissions.domain|
permissions.emailaddress|
permissions.expirationdate|
permissions.expirationtime|
permissions.id|
permissions.name|
permissions.photolink|
permissions.role|
permissions.type|
permissions.withlink

<DriveLastModifyingUserSubfieldName> ::=
lastmodifyinguser.displayname|
lastmodifyinguser.emailaddress|
lastmodifyinguser.isauthenticateduser|
lastmodifyinguser.me|
lastmodifyinguser.name|
lastmodifyinguser.permissionid|
lastmodifyinguser.photolink|
lastmodifyinguser.picture

<DriveSharingUserSubfieldName> ::=
sharinguser.displayname|
sharinguser.emailaddress|
sharinguser.isauthenticateduser|
sharinguser.me|
sharinguser.name|
sharinguser.permissionid|
sharinguser.photolink|
sharinguser.picture

<DriveTrashingUserSubfieldName> ::=
trashinguser.displayname|
trashinguser.emailaddress|
trashinguser.isauthenticateduser|
trashinguser.me|
trashinguser.name|
trashinguser.permissionid|
trashinguser.photolink|
trashinguser.picture

<DriveShortcutDetailsSubfieldName> ::=
shortcutdetails.targetid|
shortcutdetails.targetmimetype
shortcutdetails.resourcekey

<DriveFieldName> ::=
alternatelink|
appdatacontents|
appproperties|
basicpermissions|
cancomment|
canreadrevisions|
capabilities|
<DriveCapabilitiesSubfieldName>|
contenthints|
contentrestrictions|
<DriveContentRestrictionsSubfieldName>|
copyable|
copyrequireswriterpermission|
createddate|createdtime|
description|
driveid|
drivename|
editable|
explicitlytrashed|
exportlinks|
fileextension|
filesize|
foldercolorrgb|
fullfileextension|
hasaugmentedpermissions|
hasthumbnail|
headrevisionid|
iconlink|
id|
imagemediametadata|
isappauthorized|
labelinfo|
<DriveLabelInfoSubfieldName>|
labels|
<DriveLabelsSubfieldName>|
lastmodifyinguser|
<DriveLastModifyingUserSubfieldName>|
lastmodifyingusername|
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
linksharemetadata|
md5|md5checksum|md5sum|
mime|mimetype|
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
modifieddate|modifiedtime|
name|
originalfilename|
ownedbyme|
ownernames|
owners|
<DriveOwnersSubfieldName>|
parents|
<DriveParentsSubfieldName>|
permissions|
<DrivePermissionsSubfieldName>|
permissionids|
properties|
quotabytesused|quotaused|
resourcekey|
restricted|
shareable|
shared|
sharedwithmedate|sharedwithmetime|
sharinguser|
<DriveSharingUserSubfieldName>|
shortcutdetails|
<DriveShortcutDetailsSubfieldName>|
size|
spaces|
starred|
teamdriveid|
teamdrivename|
thumbnaillink|
thumbnailversion|
title|
trashed|
trasheddate|trashedtime|
trashinguser|
<DriveTrashingUserSubfieldName>|
userpermission|
version|
videomediametadata|
viewed|
viewedbymedate|viewedbymetime|
viewerscancopycontent|
webcontentlink|
webviewlink|
writerscanshare
<DriveFieldNameList> ::= "<DriveFieldName>(,<DriveFieldName>)*"

<PermissionMatch> ::=
permissionmatch|pm [not]
[type anyone|user|group|domain] [role|notrole <DriveFileACLRole>]
[allowfilediscovery|withlink <Boolean>]
[emailaddress <RegularExpression>] [name|displayname <String>]
[domain|notdomain <RegularExpression>] [domainlist|notdomainlist
<DomainNameList>]
[expirationstart <Time>] [expirationend <Time>]
[deleted <Boolean>]
endmatch|em
<PermissionMatchMode> ::=
permissionmatchmode|pmm or|and
<PermissionMatchAction> ::=
permissionmatchaction|pma process|skip

gam <UserTypeEntity> show fileinfo <DriveFileEntity>


[filepath|fullpath] [allfields|<DriveFieldName>*|(fields
<DriveFieldNameList>)]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[showdrivename] [showshareddrivepermissions]
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
[showparentsidsaslist]
[stripcrsfromname]
[formatjson]

gam <UserTypeEntity> show filepath <DriveFileEntity>


(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[stripcrsfromname] [fullpath]
gam <UserTypeEntity> print filepath <DriveFileEntity> [todrive <ToDriveAttribute>*]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[stripcrsfromname] [fullpath]
[oneitemperrow]

gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]


[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) |
<DriveFileQueryShortcut>)
(querytime<String> <Time>)*]
[corpora <CorporaAttribute>]
[select <SharedDriveEntity>]
[anyowner|(showownedby any|me|others)]
[showmimetype [not] <MimeTypeList>] [minimumfilesize <Integer>]
[filenamematchpattern <RegularExpression>]
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
[excludetrashed]
[summary none|only|plus] [summaryuser <String>] [showsize]
gam <UserTypeEntity> show filecounts
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) |
<DriveFileQueryShortcut>)
(querytime<String> <Time>)*]
[corpora <CorporaAttribute>]
[select <SharedDriveEntity>]
[anyowner|(showownedby any|me|others)]
[showmimetype [not] <MimeTypeList>] [minimumfilesize <Integer>]
[filenamematchpattern <RegularExpression>]
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
[excludetrashed]
[summary none|only|plus] [summaryuser <String>] [showsize]

<FileTreeFieldName> ::=
explicitlytrashed|
filesize|
id|
mimetype|
owners|
parents|
size|
trashed
<FileTreeFieldNameList> ::= "<FileTreeFieldName>(,<FileTreeFieldName>)*"

gam <UserTypeEntity> print filetree [todrive <ToDriveAttribute>*]


[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
[depth <Number>]]
[anyowner|(showownedby any|me|others)]
[showmimetype [not] <MimeTypeList>] [minimumfilesize <Integer>]
[filenamematchpattern <RegularExpression>]
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
[excludetrashed]
[fields <FileTreeFieldNameList>]
(orderby <DriveFileOrderByFieldName> [ascending|descending])* [delimiter
<Character>]
[noindent] [stripcrsfromname]
gam <UserTypeEntity> show filetree
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
[depth <Number>]]
[anyowner|(showownedby any|me|others)]
[showmimetype [not] <MimeTypeList>] [minimumfilesize <Integer>]
[filenamematchpattern <RegularExpression>]
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
[excludetrashed]
[fields <FileTreeFieldNameList>]
(orderby <DriveFileOrderByFieldName> [ascending|descending])* [delimiter
<Character>]
[stripcrsfromname]

gam <UserTypeEntity> print filelist [todrive <ToDriveAttribute>*]


[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) |
<DriveFileQueryShortcut>)
(querytime<String> <Time>)*]
[choose <DriveFileNameEntity>|<DriveFileEntityShortcut>]
[corpora <CorporaAttribute>]
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
[(norecursion [<Boolean>])|(depth <Number>)] [showparent]]
[anyowner|(showownedby any|me|others)]
[showmimetype [not] <MimeTypeList>] [minimumfilesize <Integer>]
[filenamematchpattern <RegularExpression>]
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
[excludetrashed]
[maxfiles <Integer>] [nodataheaders <String>]
[countsonly [summary none|only|plus] [summaryuser <String>] [showsource]
[showsize]] [countsrowfilter]
[filepath|fullpath [addpathstojson] [showdepth]] [buildtree]
[allfields|<DriveFieldName>*|(fields <DriveFieldNameList>)]
[showdrivename] [showshareddrivepermissions]
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
[showparentsidsaslist] [showpermissionslast]
(orderby <DriveFileOrderByFieldName> [ascending|descending])* [delimiter
<Character>]
[stripcrsfromname]
[formatjson [quotechar <Character>]]

<DriveActivityAction> ::=
comment|
create|
delete|trash|
dlpchange|
edit|
emptytrash|
move|
permissionchange|
reference|
rename|
restore|untrash|
settingschange|
upload
<DriveActivityActionList> ::= "<DriveActivityAction>(,<DriveActivityAction>)*"

gam <UserTypeEntity> print|show driveactivity [todrive <ToDriveAttribute>*]


[(fileid <DriveFileID>) | (folderid <DriveFolderID>) |
(drivefilename <DriveFileName>) | (drivefoldername <DriveFolderName>) |
(query <QueryDriveFile>)]
[([start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>])|(range
<Date> <Date>)|
yesterday|thismonth|(previousmonths <Integer>)]
[action|actions [not] <DriveActivityActionList>]
[consolidationstrategy legacy|none]
[idmapfile <FileName>|(gsheet <UserGoogleSheet>)(gdoc <UserGoogleDoc>)
[charset <String>] [columndelimiter <Character>] [quotechar <Character>]]
[formatjson [quotechar <Character>]]

<DriveSettingsFieldName> ::=
appinstalled|
drivethemes|
exportformats|
foldercolorpalette|
importformats|
largestchangeid|
limit|
maximportsizes|
maxuploadsize|
name|
permissionid|
rootfolderid|
usage|
usageindrive|
usageindrivetrash
<DriveSettingsFieldNameList> ::=
"<DriveSettingsFieldName>(,<DriveSettingsFieldName>)*"

gam <UserTypeEntity> print drivesettings [todrive <ToDriveAttribute>*] [allfields|


<DriveSettingsFieldName>*|(fields <DriveSettingsFieldNameList>)] [delimiter
<Character>]
gam <UserTypeEntity> show drivesettings [allfields|<DriveSettingsFieldName>*|
(fields <DriveSettingsFieldNameList>)] [delimiter <Character>]

gam <UserTypeEntity> print emptydrivefolders [todrive <ToDriveAttribute>*]


[select <SharedDriveEntity>]
gam <UserTypeEntity> print emptydrivefolders [<SharedDriveEntity>]
gam <UserTypeEntity> delete emptydrivefolders [<SharedDriveEntity>]
gam <UserTypeEntity> empty drivetrash [<SharedDriveEntity>]

# Users - Deprovision

gam <UserTypeEntity> deprovision|deprov [popimap] [signout] [turnoff2sv]

# Users - Gmail - Delegates

gam <UserTypeEntity> delegate to [convertalias] <UserEntity>


gam <UserTypeEntity> create|add delegate|delegates [convertalias] <UserEntity>
gam <UserTypeEntity> delete delegate|delegates [convertalias] <UserEntity>
gam <UserTypeEntity> update delegate|delegates [convertalias] [<UserEntity>]
gam <UserTypeEntity> show delegates|delegate [shownames] [csv]
gam <UserTypeEntity> print delegates|delegate [todrive <ToDriveAttribute>*]
[shownames]

# Users - Gmail - Filters

<GmailCategory> ::=
forums|
personal|
promotions|
social|
updates

<FilterCriteria> ::=
excludechats|
(from <String>)|
(haswords|query <List>)|
(musthaveattachment|hasattachment)|
(nowords|negatedquery <List>)|
(size larger|smaller <ByteCount>)|
(subject <String>)|
(to <String>)

<FilterAction> ::=
archive|
(category <GmailCategory>)|
(forward <EmailAddress>)|
(important|notimportant)|
(label <LabelName>)|
markread|
neverspam|
star|
trash

gam <UserTypeEntity> [create|add] filter


(<FilterCriteria>+ <FilterAction>+) |
((json [charset <Charset>] <String>) |
(json file <FileName> [charset <Charset>]))
[buildpath [<Boolean>]]
gam <UserTypeEntity> delete filters <FilterIDEntity>

gam <UserTypeEntity> info filters <FilterIDEntity> [labelidsonly] [formatjson]


gam <UserTypeEntity> show filters [labelidsonly] [formatjson]
gam <UserTypeEntity> print filters [labelidsonly] [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

# Users - Forms

gam <UserTypeEntity> create form


title <String> [description <String>] [isquiz [Boolean>]
[drivefilename <DriveFileName>] [<DriveFileParentAttribute>]
[csv [todrive <ToDriveAttribute>*]] [returnidonly]
gam <UserTypeEntity> update form <DriveFileEntity>
[title <String>] [description <String>] [isquiz [Boolean>]

gam <UserTypeEntity> print forms <DriveFileEntity> [todrive <ToDriveAttribute>*]


[formatjson [quotechar <Character>]]
gam <UserTypeEntity> show forms <DriveFileEntity>
[formatjson]

gam <UserTypeEntity> print formresponses <DriveFileEntity> [todrive


<ToDriveAttribute>*]
[filtertime.* <Time>] [filter <String>]
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> show formresponses <DriveFileEntity>
[filtertime.* <Time>] [filter <String>]
[formatjson]

# Users - Gmail - Forwarding

gam <UserTypeEntity> create|add forwardingaddress|forwardingaddresses


<EmailAddressEntity>
gam <UserTypeEntity> delete forwardingaddress|forwardingaddresses
<EmailAddressEntity>

gam <UserTypeEntity> show forwardingaddress|forwardingaddresses


gam <UserTypeEntity> info forwardingaddress|forwardingaddresses
<EmailAddressEntity>
gam <UserTypeEntity> print forwardingaddress|forwardingaddresses [todrive
<ToDriveAttribute>*]

gam <UserTypeEntity> forward <FalseValues>


gam <UserTypeEntity> forward <TrueValues> keep|leaveininbox|archive|delete|trash|
markread <EmailAddress>
gam <UserTypeEntity> show forward|forwards
gam <UserTypeEntity> print forward|forwards [enabledonly] [todrive
<ToDriveAttribute>*]
# Users - Gmail - Labels/Messages

gam <UserTypeEntity> [create|add] label|labels <String>


[messagelistvisibility hide|show] [labellistvisibility hide|show|
showifunread]
[backgroundcolor "<LabelColorHex>"] [textcolor "<LabelColorHex>"]
[buildpath [<Boolean>]]
gam <UserTypeEntity> create labellist <LabelNameEntity>
[messagelistvisibility hide|show] [labellistvisibility hide|show|
showifunread]
[backgroundcolor "<LabelColorHex>"] [textcolor "<LabelColorHex>"]
[buildpath [<Boolean>]]
gam <UserTypeEntity> update labelsettings <LabelName> [name <String>]
[messagelistvisibility hide|show] [labellistvisibility hide|show|
showifunread]
[backgroundcolor "<LabelColorHex>"] [textcolor "<LabelColorHex>"]
gam <UserTypeEntity> update label|labels [search <RegularExpression>] [replace
<LabelReplacement>] [merge [keepoldlabel]]
gam <UserTypeEntity> delete label|labels <LabelName>|regex:<RegularExpression>|--
ALL_LABELS--
gam <UserTypeEntity> delete labellist <LabelNameEntity>
gam <UserTypeEntity> delete labelid <LabelID>
gam <UserTypeEntity> delete labelidlist <LabelIDEntity>

gam <UserTypeEntity> show labels|label


[onlyuser|useronly [<Boolean>]] [showcounts [<Boolean>]]
[nested [<Boolean>]] [display allfields|basename|fullname]
gam <UserTypeEntity> print labels|label [todrive <ToDriveAttribute>*]
[onlyuser|useronly [<Boolean>]] [showcounts [<Boolean>]]

<SMTPDateHeader> ::=
date|
delivery-date|
expires|
expiry-date|
latest-delivery-time|
reply-by|
resent-date
<SMTPHeader> ::=
accept-language|
alternate-recipient|
autoforwarded|
autosubmitted|
bcc|
cc|
comments|
content-alternative|
content-base|
content-description|
content-disposition|
content-duration|
content-id|
content-identifier|
content-language|
content-location|
content-md5|
content-return|
content-transfer-encoding|
content-type|
content-features|
conversion|
conversion-with-loss|
dl-expansion-history|
deferred-delivery|
delivered-to|
discarded-x400-ipms-extensions|
discarded-x400-mts-extensions|
disclose-recipients|
disposition-notification-options|
disposition-notification-to|
encoding|
encrypted|
from|
generate-delivery-report|
importance|
in-reply-to|
incomplete-copy|
keywords|
language|
list-archive|
list-help|
list-id|
list-owner|
list-post|
list-subscribe|
list-unsubscribe|
mime-version|
message-context|
message-id|
message-type|
obsoletes|
original-encoded-information-types|
original-message-id|
originator-return-address|
pics-label|
prevent-nondelivery-report|
priority|
received|
references|
reply-to|
resent-bcc|
resent-cc|
resent-from|
resent-message-id|
resent-reply-to|
resent-sender|
resent-to|
return-path|
sender|
sensitivity|
subject|
supersedes|
to|
x400-content-identifier|
x400-content-return|
x400-content-type|
x400-mts-identifier|
x400-originator|
x400-received|
x400-recipients|
x400-trace
<SMTPHeaderList> ::= "<SMTPDateHeader|SMTPHeader>(,<SMTPDateHeader|SMTPHeader>)*"

gam <UserTypeEntity> draft message


(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String>
<String>)*
(textmessage|message <String>)|(textfile|file <FileName> [charset
<CharSet>])|(gdoc <UserGoogleDoc>)
(htmlmessage <String>)|(htmlfile <FileName> [charset <CharSet>])|(ghtml
<UserGoogleDoc>)
(replace <Tag> <UserReplacement>)* (attach <FileName> [charset <CharSet>])*
gam <UserTypeEntity> import message
(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String>
<String>)*
(addlabel <LabelName>)* [labels <LabelNameList>]
(textmessage|message <String>)|(textfile|file <FileName> [charset
<CharSet>])|(gdoc <UserGoogleDoc>)
(htmlmessage <String>)|(htmlfile <FileName> [charset <CharSet>])|(ghtml
<UserGoogleDoc>)
(replace <Tag> <UserReplacement>)* (attach <FileName> [charset <CharSet>])*
[deleted [<Boolean>]] [checkspam [<Boolean>]] [processforcalendar
[<Boolean>]]
gam <UserTypeEntity> insert message
(<SMTPDateHeader> <Time>)* (<SMTPHeader> <String>)* (header <String>
<String>)*
(addlabel <LabelName>)* [labels <LabelNameList>]
(textmessage|message <String>)|(textfile|file <FileName> [charset
<CharSet>])|(gdoc <UserGoogleDoc>)
(htmlmessage <String>)|(htmlfile <FileName> [charset <CharSet>])|(ghtml
<UserGoogleDoc>)
(replace <Tag> <UserReplacement>)* (attach <FileName> [charset <CharSet>])*
[deleted [<Boolean>]]

gam <UserTypeEntity> archive messages <GroupItem>


(((query <QueryGmail>) (matchlabel <LabelName>) [or|and])+
[quick|notquick] [doit] [max_to_archive <Number>])|(ids <MessageIDEntity>)
gam <UserTypeEntity> delete messages|threads
(((query <QueryGmail>) (matchlabel <LabelName>) [or|and])+
[quick|notquick] [doit] [max_to_delete <Number>])|(ids <MessageIDEntity>)
gam <UserTypeEntity> modify messages|threads
(((query <QueryGmail>) (matchlabel <LabelName>) [or|and])+
[quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>)
(addlabel <LabelName>)* (removelabel <LabelName>)*
gam <UserTypeEntity> spam messages|threads
(((query <QueryGmail>) (matchlabel <LabelName>) [or|and])+
[quick|notquick] [doit] [max_to_spam <Number>])|(ids <MessageIDEntity>)
gam <UserTypeEntity> trash messages|threads
(((query <QueryGmail>) (matchlabel <LabelName>) [or|and])+
[quick|notquick] [doit] [max_to_trash <Number>])|(ids <MessageIDEntity>)
gam <UserTypeEntity> untrash messages|threads
(((query <QueryGmail>) (matchlabel <LabelName>) [or|and])+
[quick|notquick] [doit] [max_to_untrash <Number>])|(ids <MessageIDEntity>)

gam <UserTypeEntity> show messages|threads


(((query <QueryGmail>) (matchlabel <LabelName>) [or|and])*
[quick|notquick] [max_to_show <Number>] [includespamtrash])|(ids
<MessageIDEntity>)
[labelmatchpattern <RegularExpression>] [sendermatchpattern
<RegularExpression>]
[countsonly|positivecountsonly] [useronly]
[headers all|<SMTPHeaderList>] [dateheaderformat iso|rfc2822|<String>]
[dateheaderconverttimezone [<Boolean>]]
[showlabels] [showbody] [showsize] [showsnippet]
[showattachments [attachmentnamepattern <RegularExpression>]]
[saveattachments [attachmentnamepattern <RegularExpression>]]
[targetfolder <FilePath>] [overwrite [<Boolean>]]
gam <UserTypeEntity> print messages|threads [todrive <ToDriveAttribute>*]
(((query <QueryGmail>) (matchlabel <LabelName>) [or|and])*
[quick|notquick] [max_to_print <Number>] [includespamtrash])|(ids
<MessageIDEntity>)
[labelmatchpattern <RegularExpression>] [sendermatchpattern
<RegularExpression>]
[countsonly|positivecountsonly] [useronly]
[headers all|<SMTPHeaderList>] [dateheaderformat iso|rfc2822|<String>
[dateheaderconverttimezone [<Boolean>]]]
[showlabels] [showbody] [showsize] [showsnippet]
[showattachments [attachmentnamepattern <RegularExpression>]]
[convertcrnl] [delimiter <Character>]

# Users - Gmail - Profile

gam <UserTypeEntity> show gmailprofile


gam <UserTypeEntity> print gmailprofile [todrive <ToDriveAttribute>*]

# Users - Gmail - Send As/Signature/Vacation

gam <UserTypeEntity> [create|add] sendas <EmailAddress> <String>


[(signature|sig|htmlsig <String>)|(file|htmlfile <FileName> [charset
<CharSet>])|(gdoc|ghtml <UserGoogleDoc>)
(replace <Tag> <UserReplacement>)*]
[html [<Boolean>]] [replyto <EmailAddress>] [default] [treatasalias
<Boolean>]
[smtpmsa.host <SMTPHostName> smtpmsa.port 25|465|587
smtpmsa.username <UserName> smtpmsa.password <Password>
[smtpmsa.securitymode none|ssl|starttls]]
gam <UserTypeEntity> update sendas <EmailAddress> [name <String>]
[(signature|sig|htmlsig <String>)|(file|htmlfile <FileName> [charset
<CharSet>])|(gdoc|ghtml <UserGoogleDoc>)
(replace <Tag> <UserReplacement>)*]
[html [<Boolean>]] [replyto <EmailAddress>] [default] [treatasalias
<Boolean>]
gam <UserTypeEntity> delete sendas <EmailAddressEntity>
gam <UserTypeEntity> info sendas <EmailAddressEntity> [compact|format|html]
gam <UserTypeEntity> show sendas [compact|format|html]
[primary|default] [verifyonly]
gam <UserTypeEntity> print sendas [compact]
[primary|default] [verifyonly] [todrive <ToDriveAttribute>*]

gam <UserTypeEntity> signature|sig


(<String>)|(htmlsig <String>)|(file|htmlfile <FileName> [charset
<Charset>])|(gdoc|ghtml <UserGoogleDoc>)
(replace <Tag> <UserReplacement>)*
[html [<Boolean>]] [replyto <EmailAddress>] [default] [treatasalias
<Boolean>]
[name <String>]
[primary]
gam <UserTypeEntity> show signature|sig [compact|format|html]
[primary|default] [verifyonly]
gam <UserTypeEntity> print signature [compact]
[primary|default] [verifyonly] [todrive <ToDriveAttribute>*]

gam <UserTypeEntity> create|add smime file <FileName> [password <Password>]


[sendas|sendasemail <EmailAddress>] [default]
gam <UserTypeEntity> update smime default
[id <S/MIMEID>] [sendas|sendasemail <EmailAddress>]
gam <UserTypeEntity> delete smime
[id <S/MIMEID>] [sendas|sendasemail <EmailAddress>]
gam <UserTypeEntity> show smimes
[primary|default|(sendas|sendasemail <EmailAddress>)]
gam <UserTypeEntity> print smimes [todrive <ToDriveAttribute>*]
[primary|default|(sendas|sendasemail <EmailAddress>)]

gam <UserTypeEntity> vacation <Boolean> subject <String>


[message|htmlmessage <String>|(file|htmlfile <FileName> [charset
<CharSet>])|(gdoc|ghtml <UserGoogleDoc>)]
(replace <Tag> <UserReplacement>)*
[html [<Boolean>]] [contactsonly [<Boolean>]] [domainonly [<Boolean>]]
[start|startdate <Date>|Started] [end|enddate <Date>|NotSpecified]
gam <UserTypeEntity> show vacation [compact|format|html] [enabledonly]
gam <UserTypeEntity> print vacation [compact] [enabledonly] [todrive
<ToDriveAttribute>*]

# Users - Gmail - Settings

gam <UserTypeEntity> imap|imap4 <Boolean>


[noautoexpunge] [expungebehavior archive|deleteforever|trash]
[maxfoldersize 0|1000|2000|5000|10000]
gam <UserTypeEntity> show imap|imap4
gam <UserTypeEntity> print imap|imap4 [todrive <ToDriveAttribute>*]

gam <UserTypeEntity> pop|pop3 <Boolean>


[for allmail|newmail|mailfromnowon|fromnowon]
[action keep|leaveininbox|archive|delete|trash|markread]
gam <UserTypeEntity> show pop|pop3
gam <UserTypeEntity> print pop|pop3 [todrive <ToDriveAttribute>*]

gam <UserTypeEntity> language <Language>


gam <UserTypeEntity> show language
gam <UserTypeEntity> print language [todrive <ToDriveAttribute>*]

# Users - Groups

gam <UserTypeEntity> add group|groups


([<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)+
gam <UserTypeEntity> delete group|groups
[(domain <DomainName>)|(customerid <CustomerID>)|<GroupEntity>]
gam <UserTypeEntity> update group|groups
[(domain <DomainName>)|(customerid <CustomerID>)]) [<GroupRole>]
[[delivery] <DeliverySetting>]
([<GroupRole>] [[delivery] <DeliverySetting>] [<GroupEntity>])*
gam <UserTypeEntity> sync group|groups
[(domain <DomainName>)|(customerid <CustomerID>)]
[<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)*
gam <UserTypeEntity> check group|groups
[roles <GroupRoleList>] [includederivedmembership] <GroupEntity>
gam <UserTypeEntity> print groups [todrive <ToDriveAttribute>*]
[(domain <DomainName>)|(customerid <CustomerID>)]
[roles <GroupRoleList>] [countsonly|nodetails]
gam <UserTypeEntity> show groups
[(domain <DomainName>)|(customerid <CustomerID>)]
[roles <GroupRoleList>] [countsonly|nodetails]
gam <UserTypeEntity> print groupslist [todrive <ToDriveAttribute>*]
[(domain <DomainName>)|(customerid <CustomerID>)]
[delimiter <Character>] [quotechar <Character>]

# Users - Invitations

gam send userinvitation <EmailAddress>


gam cancel userinvitation <EmailAddress>
gam info userinvitation <EmailAddress> [formatjson]
gam show userinvitations
[state notyetsent|invited|accepted|declined]
[orderby email|updatetime [ascending|descending]]
[formatjson]
gam print userinvitations [todrive <ToDriveAttribute>*]
[[state notyetsent|invited|accepted|declined]
[orderby email|updatetime [ascending|descending]]
[[formatjson [quotechar <Character>]]
gam check isinvitable|userinvitation <EmailAddress>
gam <UserTypeEntity> check isinvitable [todrive <ToDriveAttribute>*]

# Users - Keep Notes

gam <UserTypeEntity> create note [title <String>]


((text <String>)|
(textfile <FileName> [charset <CharSet>])|
(gdoc <UserGoogleDoc>)|
(([missingtextvalue <String>] (json [charset <Charset>] <JSONData>)|(json
file <FileName> [charset <Charset>]))))
(json [charset <Charset>] <JSONData>)|(json file <FileName> [charset
<Charset>]))
[copyacls [copyowneraswriter]]
[compact|formatjson|nodetails]
gam <UserTypeEntity> delete note <NoteNameEntity>

<NotesField> ::=
attachments|
body|
createtime|
name|
permissions|
title|
trashed|
trashtime|
updatetime
<NotesFieldList> ::= "<NotesField>(,<NotesField>)*"

gam <UserTypeEntity> info note <NotesNameEntity>


[fields <NotesFieldList>]
[compact|formatjson]

gam <UserTypeEntity> show notes


[fields <NotesFieldList>] [filter <String>]
[role owner|writer]
[compact|formatjson]
gam <UserTypeEntity> print notes [todrive <ToDriveAttribute>*]
[fields <NotesFieldList>] [filter <String>]
[role owner|writer]
[formatjson [quotechar <Character>]]

gam <UserTypeEntity> get noteattachments <NotesNameEntity>


[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
[<DriveFileParentAttribute>]

gam <UserTypeEntity> create noteacl <NotesNameEntity>


(user|group <EmailAddress>)+
(json [charset <Charset>] <JSONData>)|(json file <FileName> [charset
<Charset>])
[nodetails]
gam <UserTypeEntity> delete noteacl <NotesNameEntity>
(user|group <EmailAddress>)+
(json [charset <Charset>] <JSONData>)|(json file <FileName> [charset
<Charset>])

# Users - Licenses

gam <UserTypeEntity> create|add license <SKUID> [product|productid <ProductID>]


[preview] [actioncsv]
gam <UserTypeEntity> update license <SKUID> [product|productid <ProductID>] [from]
<SKUID> [preview] [actioncsv]
gam <UserTypeEntity> delete license <SKUID> [product|productid <ProductID>]
[preview] [actioncsv]
gam <UserTypeEntity> sync license <SKUID> [product|productid <ProductID>] [addonly|
removeonly] [preview] [actioncsv]

# Users - Contacts and Profiles

<PeopleContactAttribute> ::=
(additionalname|middlename <String>)|
(address clear|(work|home|other|<String> ((formatted|unstructured
<String>)|(streetaddress <String>)|(pobox <String>)|
(neighborhood <String>)|(locality <String>)|(region <String>)|
(postalcode <String>)|(country <String>))* notprimary|primary))|
(billinginfo <String>)|
(biography|biographies <String>|(file <FileName> [charset <Charset>])|(gdoc
<UserGoogleDoc>))|
(birthday <Date>)|
(calendar clear|(work|home|free-busy|<String> <URL> notprimary|primary))|
(clientdata <String> <String>)|
(directoryserver <String>)|
(email clear|(work|home|other|<String> <EmailAddress> notprimary|primary))|
(event clear|(anniversary|other|<String> <Date>))|
(externalid clear|(account|customer|network|organization|<String>
<String>))|
(familyname|lastname <String>)|
(fileas <String>)|
(gender female|male)|
(givenname|firstname <String>)|
(im clear|(work|home|other|<String> aim|gtalk|icq|jabber|msn|net_meeting|
qq|skype|yahoo <String> notprimary|primary))|
(interests clear|<String>)|
(initials <String>)|
(jot clear|(work|home|other|keywords|user> <String>))|
(json [charset <Charset>] <JSONData>)|(json file <FileName> [charset
<Charset>])|
(language <Language>)|
(locale clear|<Language>)|
(location clear|<String>)|
(maidenname <String>)|
(mileage <String>)|
(name <String>)|
(nickname <String>)|
(note <String>|(file <FileName> [charset <Charset>])|(gdoc
<UserGoogleDoc>))|
(occupation clear|<String>)|
(organization clear|(work|other|<String> <String> ((location <String>)|
(department <String>)|(title <String>)|(jobdescription <String>)|(symbol
<String>))* notprimary|primary))|
(phone clear|(work|home|other|fax|work_fax|home_fax|other_fax|main|
company_main|assistant|mobile|work_mobile|pager|work_pager|car|radio|callback|isdn|
telex|tty_tdd|<String> <String> notprimary|primary))|
(prefix <String>)|
(priority low|normal|high)
(relation clear|(spouse|child|mother|father|parent|brother|sister|friend|
relative|domestic_partner|manager|assistant|referred_by|partner|<String>
<String>))|
(sensitivity confidential|normal|personal|private)
(shortname <String>)|
(skills clear|<String>)|
(subject <String>)|
(suffix <String>)|
(userdefinedfield clear|(<String> <String>))|
(website clear|(app_install_page|blog|ftp|home|home_page|other|profile|
reservations|work|<String> <URL> notprimary|primary))

<PeopleUserContactSelection> ::=
[(selectcontactgroup <PeopleContactGroupItem>)|
[query <QueryContact>]]
[emailmatchpattern <RegularExpression> [emailmatchtype work|home|other|
<String>]]

gam <UserTypeEntity> create contact


[<PeopleContactAttribute>+]
(contactgroup <ContactGroupItem>)*
gam <UserTypeEntity> update contacts
<PeopleResourceNameEntity>|(<PeopleUserContactSelection> endquery)
[<PeopleContactAttribute>+]
(contactgroup <ContactGroupItem>)*|((addcontactgroup <ContactGroupItem>)*
(removecontactgroup <ContactGroupItem>)*)
gam <UserTypeEntity> delete contacts
<PeopleResourceNameEntity>|<PeopleUserContactSelection>

gam <UserTypeEntity> clear contacts


<PeopleResourceNameEntity>|<PeopleUserContactSelection>
[emailclearpattern <RegularExpression>] [emailcleartype work|home|other|
<String>]
[delete_cleared_contacts_with_no_emails]

gam <UserTypeEntity> dedup contacts


[<PeopleResourceNameEntity>|<PeopleUserContactSelection>]
[matchType [<Boolean>]]
gam <UserTypeEntity> replacedomain contacts
[<PeopleResourceNameEntity>|<PeopleUserContactSelection>]
(domain <OldDomainName> <NewDomainName>)+

gam <UserTypeEntity> update contactphotos


<PeopleResourceNameEntity>|<PeopleUserContactSelection>
[drivedir|(sourcefolder <FilePath>)] [filename <FileNamePattern>]
gam <UserTypeEntity> get contactphotos
<PeopleResourceNameEntity>|<PeopleUserContactSelection>
[drivedir|(targetfolder <FilePath>)] [filename <FileNamePattern>]
gam <UserTypeEntity> delete contactphotos
<PeopleResourceNameEntity>|<PeopleUserContactSelection>

gam <UserTypeEntity> info contacts


<PeopleResourceNameEntity>
[allfields|(fields <PeopleFieldNameList>)] [showgroups] [showmetadata]
[formatjson]

<PeoplePrintShowUserContactSelection> ::=
[(selectcontactgroup <PeopleContactGroupItem>)|
([query <QueryContact>] [selectmaincontacts|selectothercontacts])]
[emailmatchpattern <RegularExpression> [emailmatchtype work|home|other|
<String>]]

gam <UserTypeEntity> show contacts


<PeoplePrintShowUserContactSelection>
[orderby firstname|lastname|(lastmodified ascending)|(lastnodified
descending)
[countsonly|allfields|(fields <PeopleFieldNameList>)] [showgroups]
[showmetadata]
[formatjson]
gam <UserTypeEntity> print contacts [todrive <ToDriveAttribute>*]
<PeoplePrintShowUserContactSelection>
[orderby firstname|lastname|(lastmodified ascending)|(lastnodified
descending)
[countsonly|allfields|(fields <PeopleFieldNameList>)] [[showgroups|
showgroupnameslist] showmetadata]
[formatjson [quotechar <Character>]]

<OtherContactsFieldName> ::=
emailaddresses|
metadata|
names|
phonenumbers|
photos
<OtherContactsFieldNameList> ::=
"<OtherContactsFieldName>(,<OtherContactFieldName>)*"

<OtherContactsSelection> ::=
[query <QueryContact>]
[emailmatchpattern <RegularExpression> [emailmatchtype work|home|other|
<String>]]

gam <UserTypeEntity> copy othercontacts


<OtherContactsResourceNameEntity>|<OtherContactsSelection>
gam <UserTypeEntity> move othercontacts
<OtherContactsResourceNameEntity>|<OtherContactsSelection>
gam <UserTypeEntity> update othercontacts
<OtherContactsResourceNameEntity>|<OtherContactsSelection>
[<PeopleContactAttribute>+]
(contactgroup <ContactGroupItem>)*
gam <UserTypeEntity> delete othercontacts
<OtherContactsResourceNameEntity>|<OtherContactsSelection>

gam <UserTypeEntity> show othercontacts


[<OtherContactsSelection>]
[countsonly|allfields|(fields <OtherContactsFieldNameList>)] [showmetadata]
[formatjson]
gam <UserTypeEntity> print othercontacts [todrive <ToDriveAttribute>*]
[<OtherContactsSelection>]
[countsonly|allfields|(fields <OtherContactsFieldNameList>)] [showmetadata]
[formatjson [quotechar <Character>]]

<PeopleContactGroupAttribute> ::=
(clientdata <String> <String>)|
(json [charset <Charset>] <JSONData>) | (json file <FileName> [charset
<Charset>])|
name <String>

<PeopleContactGroupField> ::=
clientdata|
grouptype|
membercount|
metadata|
name
<PeopleContactGroupFieldList> ::=
"<PeopleContactGroupField>(,<PeopleContactGroupField>)*"

gam <UserTypeEntity> create contactgroup <PeopleContactGroupAttribute>+


gam <UserTypeEntity> update contactgroup <PeopleContactGroupItem>
<PeopleContactGroupAttribute>+
gam <UserTypeEntity> delete contactgroups <PeopleContactGroupEntity>

gam <UserTypeEntity> info contactgroups <PeopleContactGroupEntity>


[allfields|(fields <PeopleContactGroupFieldList>)] [showmetadata]
[formatjson]
gam <UserTypeEntity> show contactgroups
[allfields|(fields <PeopleContactGroupFieldList>)] [showmetadata]
[formatjson]
gam <UserTypeEntity> print contactgroups [todrive <ToDriveAttribute>*]
[allfields|(fields <PeopleContactGroupFieldList>)] [showmetadata]
[formatjson [quotechar <Character>]]

<PeopleFieldName> ::=
addresses|
ageranges|
biographies|
birthdays|
calendarurls|
clientdata|
coverphotos|
emailaddresses|
events|
externalids|
genders|
imclients|
interests|
locales|
locations|
memberships|
metadata|
misckeywords|
names|
nicknames|
occupations|
organizations|
phonenumbers|
photos|
relations|
sipaddresses|
skills|
urls|
updated|updatetime|
userdefined
<PeopleFieldNameList> ::= "<PeopleFieldName>(,<PeopleFieldName>)*"

gam <UserTypeEntity> show peopleprofile


[allfields|(fields <PeopleFieldNameList>)] [showmetadata]
[formatjson]
gam <UserTypeEntity> print peopleprofile [todrive <ToDriveAttribute>*]
[allfields|(fields <PeopleFieldNameList>)] [showmetadata]
[formatjson [quotechar <Character>]]

# Users - Photo

gam <UserTypeEntity> update photo [<FileNamePattern>]


gam <UserTypeEntity> update photo [drivedir|(sourcefolder <FilePath>)] [filename
<FileNamePattern>]
gam <UserTypeEntity> delete photo
gam <UserTypeEntity> get photo [drivedir|(targetfolder <FilePath>)] [filename
<FileNamePattern>]
[noshow]
gam <UserTypeEntity> get profilephoto [drivedir|(targetfolder <FilePath>)]
[filename <FileNamePattern>]
[noshow] [returnurlonly]

# Users - Profile

gam <UserTypeEntity> profile share|shared|unshare|unshared

gam <UserTypeEntity> show profile

# Users - Tasks

<TaskAttribute> ::=
(title <String>)|
(notes <String>)|
(status needsaction|completed)

gam <UserTypeEntity> create task <TasklistIDEntity>


<TaskAttribute>* [parent <TaskID>] [previous <TaskID>]
[compact|formatjson|returnidonly]
gam <UserTypeEntity> update task <TasklistIDTaskIDEntity>
<TaskAttribute>*
[compact|formatjson]
gam <UserTypeEntity> delete task <TasklistIDTaskIDEntity>
gam <UserTypeEntity> move task <TasklistIDTaskIDEntity>
[parent <TaskID>] [previous <TaskID>]
[compact|formatjson]

gam <UserTypeEntity> info task <TasklistIDTaskIDEntity>


[compact|formatjson]
gam <UserTypeEntity> show tasks [tasklists <TasklistIDEntity>]
[completedmin <Time>] [completedmax <Time>]
[duemin <Time>] [duemax <Time>]
[updatedmin <Time>]
[showcompleted [<Boolean>]] [showdeleted [<Boolean>]] [showhidden
[<Boolean>]] [showall]
[orderby completed|due|updated]
[compact|formatjson]
gam <UserTypeEntity> print tasks [tasklists <TasklistIDEntity>] [todrive
<ToDriveAttribute>*]
[completedmin <Time>] [completedmax <Time>]
[duemin <Time>] [duemax <Time>]
[updatedmin <Time>]
[showcompleted [<Boolean>]] [showdeleted [<Boolean>]] [showhidden
[<Boolean>]] [showall]
[orderby completed|due|updated]
[formatjson [quotechar <Character>]]

<TasklistAttribute> ::=
(title <String>)

gam <UserTypeEntity> create tasklist


<TasklistAttribute>*
[returnidonly] [formatjson]
gam <UserTypeEntity> update tasklist <TasklistIDEntity>
<TasklistAttribute>*
[formatjson]
gam <UserTypeEntity> delete tasklist <TasklistIDEntity>
gam <UserTypeEntity> clear tasklist <TasklistIDEntity>

gam <UserTypeEntity> info tasklist <TasklistIDEntity>


[formatjson]
gam <UserTypeEntity> show tasklists
[formatjson]
gam <UserTypeEntity> print tasklists [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]

# Users - Team Drives

<SharedDriveRestrictionsSubfieldName> ::=
restrictions.adminmanagedrestrictions|
restrictions.copyrequireswriterpermission|
restrictions.domainusersonly|
restrictions.teammembersonly

gam <UserTypeEntity> show teamdrivethemes


gam <UserTypeEntity> create|add teamdrive <Name> [adminaccess|asadmin]
[(theme|themeid <String>) | ([customtheme <DriveFileID> <Float> <Float>
<Float>] [color <ColorValue>])]
(<SharedDriveRestrictionsSubfieldName> <Boolean>)*
[hide|hidden <Boolean>]
gam <UserTypeEntity> update teamdrive <SharedDriveEntity> [adminaccess|asadmin]
[name <Name>]
[(theme|themeid <String>) | ([customtheme <DriveFileID> <Float> <Float>
<Float>] [color <ColorValue>])]
(<SharedDriveRestrictionsSubfieldName> <Boolean>)*
[hide|hidden <Boolean>] [ou|org|orgunit <OrgUnitItem>]
gam <UserTypeEntity> delete teamdrive <SharedDriveEntity>
[adminaccess|asadmin] [allowitemdeletion]
gam <UserTypeEntity> hide teamdrive <SharedDriveEntity>
gam <UserTypeEntity> unhide teamdrive <SharedDriveEntity>
gam <UserTypeEntity> info teamdrive <SharedDriveEntity> [fields
<SharedDriveFieldNameList>]
[formatjson]
gam <UserTypeEntity> info teamdrive <SharedDriveEntity> [fields
<SharedDriveFieldNameList>]
[formatjson]
gam <UserTypeEntity> show teamdriveinfo <SharedDriveEntity> [fields
<SharedDriveFieldNameList>]
[formatjson]
gam <UserTypeEntity> print teamdrives [todrive <ToDriveAttribute>*]
[adminaccess|asadmin [teamdriveadminquery|query <QueryTeamDrive>]]
[matchname <RegularExpression>] (role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
[formatjson [quotechar <Character>]]
gam <UserTypeEntity> show teamdrives
[adminaccess|asadmin [teamdriveadminquery|query <QueryTeamDrive>]]
[matchname <RegularExpression>] (role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
[formatjson]

# Users - Force Signout and Turn Off 2-Step Verification

gam <UserTypeEntity> signout


gam <UserTypeEntity> turnoff2sv

# Users - Spreadsheets

See: https://developers.google.com/sheets/api/reference/rest/
The following right-hand side characters are literal: {}[],'":
The following right-hand side characters are part of the meta-syntax: <>()*|
<SpreadsheetJSONCreateRequest> ::=
'{"properties": {<SpreadsheetProperties>}, "sheets": [{<Sheet>}(,
{<Sheet>})*],
"namedRanges": [{<NamedRange>}(,{<NamedRange>})*],
"developerMetadata": [{<DeveloperMetadata>}(,{DeveloperMetadata>})]}'
<SpreadsheetJSONUpdateRequest> ::=
'{"requests": [{<Request>}(,{<Request>})], "includeSpreadsheetInResponse":
true|false,
"responseRanges": ["<SpreadsheetRange>"(,"<SpreadsheetRange>")],
"responseIncludeGridData": true|false}
<SpreadsheetField> ::=
developermetadata|
namedranges|
properties|
sheets|
spreadsheetid|
spreadsheeturl
<SpreadsheetFieldList> ::= "<SpreadsheetField>(,<SpreadsheetField>)*"
<SpreadsheetRange> ::= <String>
<SpreadsheetRangeList> ::= "'<SpreadsheetRange>'(,'<SpreadsheetRange>')*"
<SpreadsheetValue> ::= "<String>"|<Number>|true|false
<SpreadsheetValueList> ::= "<SpreadsheetValue>(,<SpreadsheetValue>)*"
<SpreadsheetJSONRangeValues> ::=
'{"range": <SpreadsheetRange>, "values":
[<SpreadsheetValueList>(,<SpreadsheetValueList>)*],
"majorDimension": "ROWS|COLUMNS"}'
<SpreadsheetJSONRangeValuesList> ::=
'[<SpreadsheetJSONRangeValues>(,<SpreadsheetJSONRangeValues>)*]'

See: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/create
See: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/
batchUpdate

gam <UserTypeEntity> create|add sheet


((json [charset <Charset>] <SpreadsheetJSONCreateRequest>) |
(json file <FileName> [charset <Charset>]))
[<DriveFileParentAttribute>]
[formatjson] [returnidonly]
gam <UserTypeEntity> update sheet <DriveFileEntity>
((json [charset <Charset>] <SpreadsheetJSONUpdateRequest>) |
(json file <FileName> [charset <Charset>]))
[formatjson]
gam <UserTypeEntity> info|show sheet <DriveFileEntity>
[fields <SpreadsheetFieldList>]
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
[includegriddata [<Boolean>]]
[formatjson]
gam <UserTypeEntity> print sheet <DriveFileEntity> [todrive <ToDriveAttribute>*]
[fields <SpreadsheetFieldList>]
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
[includegriddata [<Boolean>]]
[formatjson [quotechar <Character>]]

See:
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values#Valu
eRange
See:
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/
append
See:
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/
batchUpdate

gam <UserTypeEntity> append sheetrange <DriveFileEntity>


((json [charset <Charset>] <SpreadsheetJSONRangeValues>|
<SpreadsheetJSONRangeValuesList>) |
(json file <FileName> [charset <Charset>]))
[overwrite|insertrows]
[raw|userentered] [formula|formattedvalue|unformattedvalue] [serialnumber|
formattedstring]
[includevaluesinresponse [<Boolean>]]
[formatjson]
gam <UserTypeEntity> update sheetrange <DriveFileEntity>
((json [charset <Charset>] <SpreadsheetJSONRangeValues>|
<SpreadsheetJSONRangeValuesList>)+
(json file <FileName> [charset <Charset>])+)
[raw|userentered] [formula|formattedvalue|unformattedvalue] [serialnumber|
formattedstring]
[includevaluesinresponse [<Boolean>]]
[formatjson]
gam <UserTypeEntity> clear sheetrange <DriveFileEntity>
(range <SpreadsheetRange>)+ (rangelist <SpreadsheetRangeList>)*
[formatjson]

gam <UserTypeEntity> print sheetrange <DriveFileEntity> [todrive


<ToDriveAttribute>*]
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
[rows|columns] [formula|formattedvalue|unformattedvalue] [serialnumber|
formattedstring]
[formatjson [quotechar <Character>] [valuerangesonly [<Boolean>]]]
gam <UserTypeEntity> show sheetrange <DriveFileEntity>
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
[rows|columns] [formula|formattedvalue|unformattedvalue] [serialnumber|
formattedstring]
[formatjson [valuerangesonly [<Boolean>]]]

# Users - Tokens

gam <UserTypeEntity> delete tokens clientid <ClientID>

gam <UserTypeEntity> print tokens|token [todrive <ToDriveAttribute>*] [clientid


<ClientID>]
[aggregateby|orderby clientid|id|appname|displaytext] [delimiter
<Character>]
gam <UserTypeEntity> show tokens|token|3lo|oauth [clientid <ClientID>]
[aggregateby|orderby clientid|id|appname|displaytext]
gam print tokens|token [todrive <ToDriveAttribute>*] [clientid <ClientID>]
[aggregateby|orderby clientid|id|appname|displaytext] [delimiter
<Character>]
[<UserTypeEntity>]

# Verifications

gam create|add verify|verification <DomainName>


gam update verify|verification <DomainName> cname|txt|text|site|file
gam info verify|verification

You might also like