Compare commits

...

3 Commits

Author SHA1 Message Date
Ross Scroggs
bebafb428d Vault query updates 2025-09-28 19:40:33 -07:00
Ross Scroggs
5e59363a0c Update Vault-Takeout.md 2025-09-28 16:11:55 -07:00
Ross Scroggs
4b2e0db720 Added commands to create, copy and delete Vault saved queries.
Some checks failed
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build x86_64 macOS 15, macos-15-intel) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm MacOS 26, macos-26) (push) Has been cancelled
Build and test GAM / build (build, 12, Build Intel Windows, windows-2025) (push) Has been cancelled
Build and test GAM / build (build, 13, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-certs (push) Has been cancelled
Push wiki / pushwiki (push) Has been cancelled
2025-09-28 14:22:33 -07:00
8 changed files with 192 additions and 54 deletions

View File

@@ -5421,6 +5421,7 @@ gam print vaultcounts [todrive <ToDriveAttributes>*]
[(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone]
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timezone <TimeZone>]
[excludedrafts <Boolean>]
[<JSONData>]
[wait <Integer>]
gam print vaultcounts [todrive <ToDriveAttributes>*]
matter <MatterItem> operation <String> [wait <Integer>]
@@ -5434,18 +5435,20 @@ gam create vaultexport|export matter <MatterItem> [name <String>]
[format ics|mbox|pst|xml]
[region any|europe|us] [showdetails|returnidonly]
gam create vaultexport|export matter <MatterItem> [name <String>] corpus calendar|drive|gemini|groups|hangouts_chat|mail|voice
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
(shareddrives|teamdrives (<SharedDriveIDList>|(select <FileSelector>|<CSVFileSelector>))) |
(rooms (<ChatSpaceList>|(select <FileSelector>|<CSVFileSelector>))) |
(sitesurl (<URLList>||(select <FileSelector>|<CSVFileSelector>)))
gam create vaultexport|export matter <MatterItem> [name <String>]
corpus calendar|drive|gemini|groups|hangouts_chat|mail|voice
[scope all_data|held_data|unprocessed_data]
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
(documentids (<DriveFileIDList>|(select <FileSelector>|<CSVFileSelector>))) |
(shareddrives|teamdrives (<SharedDriveIDList>|(select <FileSelector>|<CSVFileSelector>))) |
[(includeshareddrives <Boolean>)|(shareddrivesoption included|included_if_account_is_not_a_member|not_included)]
(sitesurl (<URLList>||(select <FileSelector>|<CSVFileSelector>)))
[driveversiondate <Date>|<Time>]
[includerooms <Boolean>]
(rooms (<ChatSpaceList>|(select <FileSelector>|<CSVFileSelector>))) |
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timezone <TimeZone>]
[locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
[responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
[(includeshareddrives <Boolean>)|(shareddrivesoption included|included_if_account_is_not_a_member|not_included)]
[driveversiondate <Date>|<Time>]
[includerooms <Boolean>]
(covereddata calllogs|textmessages|voicemails)*
[driveclientsideencryption any|encrypted|unencrypted]
[includeaccessinfo <Boolean>]
@@ -5575,10 +5578,13 @@ gam create vaultquery <MatterItem> [name <String>]
[locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
[responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
(covereddata calllogs|textmessages|voicemails)*
[shownames] [formatjson]
[<JSONData>]
[shownames]
[showdetails|returnidonly|formatjson]
gam copy vaultquery <MatterItem> <QueryItem> [targetmatter <MatterItem"] [name <String>]
[shownames] [formatjson]
gam copy vaultquery <MatterItem> <QueryItem> [targetmatter <MatterItem>] [name <String>]
[shownames]
[showdetails|returnidonly|formatjson]
gam delete vaultquery <QueryItem> matter <MatterItem>
gam delete vaultquery <MatterItem> <QueryItem>

View File

@@ -1,3 +1,9 @@
7.22.07
Added options `showdetails` and `returnidonly` to `gam create|copy vaultquery`.
Added option `<JSONData>` to `gam create vaultexport|vaultquery` and `gam print vaultcounts`.
7.22.06
Added commands to create, copy and delete Vault saved queries.
@@ -19,7 +25,7 @@ gam create vaultquery <MatterItem> [name <String>]
(covereddata calllogs|textmessages|voicemails)*
[shownames] [formatjson]
gam copy vaultquery <MatterItem> <QueryItem> [targetmatter <MatterItem"] [name <String>]
gam copy vaultquery <MatterItem> <QueryItem> [targetmatter <MatterItem>] [name <String>]
[shownames] [formatjson]
gam delete vaultquery <QueryItem> matter <MatterItem>

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.22.06'
__version__ = '7.22.07'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position
@@ -41814,11 +41814,13 @@ VAULT_QUERY_ARGS = [
# drive
'driveclientsideencryption', 'driveversiondate', 'includeshareddrives', 'includeteamdrives', 'shareddrivesoption',
# hangoutsChat
'includerooms',
'includerooms',
# mail
'mailclientsideencryption', 'excludedrafts',
# voice
'covereddata',
# all
'json',
] + list(VAULT_SEARCH_METHODS_MAP.keys())
def _buildVaultQuery(myarg, query, corpusArgumentMap):
@@ -41835,11 +41837,11 @@ def _buildVaultQuery(myarg, query, corpusArgumentMap):
elif myarg == 'scope':
query['dataScope'] = getChoice(VAULT_EXPORT_DATASCOPE_MAP, mapChoice=True)
elif myarg in VAULT_SEARCH_METHODS_MAP:
if query.get('searchMethod'):
if query.get('method'):
Cmd.Backup()
usageErrorExit(Msg.MULTIPLE_SEARCH_METHODS_SPECIFIED.format(formatChoiceList(VAULT_SEARCH_METHODS_MAP)))
searchMethod = VAULT_SEARCH_METHODS_MAP[myarg]
query['searchMethod'] = searchMethod
query['method'] = searchMethod
if searchMethod == 'ACCOUNT':
query['accountInfo'] = {'emails': getNormalizedEmailAddressEntity()}
elif searchMethod == 'ORG_UNIT':
@@ -41901,11 +41903,19 @@ def _buildVaultQuery(myarg, query, corpusArgumentMap):
elif myarg == 'covereddata':
query.setdefault('voiceOptions', {'coveredData': []})
query['voiceOptions']['coveredData'].append(getChoice(VAULT_VOICE_COVERED_DATA_MAP, mapChoice=True))
# all
elif myarg == 'json':
jsonData = getJSON([])
if 'query' in jsonData:
query.update(jsonData['query'])
else:
query.update(jsonData)
def _validateVaultQuery(body, corpusArgumentMap):
if 'corpus' not in body['query']:
missingArgumentExit(f'corpus {formatChoiceList(corpusArgumentMap)}')
if 'searchMethod' not in body['query']:
if 'method' not in body['query']:
missingArgumentExit(formatChoiceList(VAULT_SEARCH_METHODS_MAP))
if 'exportOptions' in body:
for corpus, options in VAULT_CORPUS_OPTIONS_MAP.items():
@@ -41935,6 +41945,7 @@ def _validateVaultQuery(body, corpusArgumentMap):
# [locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
# [responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
# (covereddata calllogs|textmessages|voicemails)*
# [<JSONData>]
# [driveclientsideencryption any|encrypted|unencrypted]
# [includeaccessinfo <Boolean>]
# [excludedrafts <Boolean>] [mailclientsideencryption any|encrypted|unencrypted]
@@ -43054,6 +43065,7 @@ def doCreateCopyVaultQuery(copyCmd):
targetId = None
cd = drive = None
FJQC = FormatJSONQuoteChar()
returnIdOnly = showDetails = False
while Cmd.ArgumentsRemaining():
myarg = getArgument()
if myarg == 'name':
@@ -43067,6 +43079,12 @@ def doCreateCopyVaultQuery(copyCmd):
_, drive = buildGAPIServiceObject(API.DRIVE3, _getAdminEmail())
if drive is None:
return
elif myarg == 'showdetails':
showDetails = True
returnIdOnly = False
elif myarg == 'returnidonly':
returnIdOnly = True
showDetails = False
else:
FJQC.GetFormatJSON(myarg)
if copyCmd:
@@ -43078,6 +43096,7 @@ def doCreateCopyVaultQuery(copyCmd):
resultId = targetId
resultNameId = targetNameId
else:
_validateVaultQuery(body, VAULT_CORPUS_ARGUMENT_MAP)
if not body['displayName']:
body['displayName'] = 'GAM {body["query"]["corpus"]} Query - {ISOformatTimeStamp(todaysTime())}'
resultId = matterId
@@ -43086,7 +43105,13 @@ def doCreateCopyVaultQuery(copyCmd):
result = callGAPI(v.matters().savedQueries(), 'create',
throwReasons=[GAPI.NOT_FOUND, GAPI.BAD_REQUEST, GAPI.FORBIDDEN, GAPI.INVALID_ARGUMENT, GAPI.ALREADY_EXISTS],
matterId=resultId, body=body)
_showVaultQuery(resultNameId, result, cd, drive, FJQC)
if not returnIdOnly:
if not FJQC.formatJSON:
entityActionPerformed([Ent.VAULT_MATTER, matterNameId, Ent.VAULT_QUERY, formatVaultNameId(result['displayName'], result['savedQueryId'])])
if showDetails or FJQC.formatJSON:
_showVaultQuery(resultNameId, result, cd, drive, FJQC)
else:
writeStdout(f'{result["savedQueryId"]}\n')
except (GAPI.notFound, GAPI.badRequest, GAPI.forbidden, GAPI.invalidArgument, GAPI.alreadyExists) as e:
entityActionFailedWarning([Ent.VAULT_MATTER, resultNameId, Ent.VAULT_QUERY, body['displayName']], str(e))
@@ -43105,12 +43130,15 @@ def doCreateCopyVaultQuery(copyCmd):
# [locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
# [responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
# (covereddata calllogs|textmessages|voicemails)*
# [shownames] [formatjson]
# [<JSONData>]
# [shownames]
# [showdetails|returnidonly|formatjson]
def doCreateVaultQuery():
doCreateCopyVaultQuery(False)
# gam copy vaultquery <MatterItem> <QueryItem> [targetmatter <MatterItem"] [name <String>]
# [shownames] [formatjson]
# gam copy vaultquery <MatterItem> <QueryItem> [targetmatter <MatterItem>] [name <String>]
# [shownames]
# [showdetails|returnidonly|formatjson]
def doCopyVaultQuery():
doCreateCopyVaultQuery(True)
@@ -43632,6 +43660,7 @@ PRINT_VAULT_COUNTS_TITLES = ['account', 'count', 'error']
# (accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone|entireorg
# [terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timezone <TimeZone>]
# [excludedrafts <Boolean>]
# [<JSONData>]
# [wait <Integer>]
# gam print vaultcounts [todrive <ToDriveAttributes>*]
# matter <MatterItem> operation <String> [wait <Integer>]
@@ -43686,7 +43715,7 @@ def doPrintVaultCounts():
doWait = True
response = operation.get('response', {})
query = operation['metadata']['query']
search_method = query.get('searchMethod')
search_method = query.get('method')
# ARGH count results don't include accounts with zero items.
# so we keep track of which accounts we searched and can report
# zero data for them.

View File

@@ -10,6 +10,41 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
### 7.22.06
Added commands to create, copy and delete Vault saved queries.
```
gam create vaultquery <MatterItem> [name <String>]
corpus calendar|drive|gemini|groups|hangouts_chat|mail|voice
[scope all_data|held_data|unprocessed_data]
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
(documentids (<DriveFileIDList>|(select <FileSelector>|<CSVFileSelector>))) |
(shareddrives|teamdrives (<SharedDriveIDList>|(select <FileSelector>|<CSVFileSelector>))) |
[(includeshareddrives <Boolean>)|(shareddrivesoption included|included_if_account_is_not_a_member|not_included)]
(sitesurl (<URLList>||(select <FileSelector>|<CSVFileSelector>)))
[driveversiondate <Date>|<Time>]
[includerooms <Boolean>]
(rooms (<ChatSpaceList>|(select <FileSelector>|<CSVFileSelector>))) |
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timezone <TimeZone>]
[locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
[responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
(covereddata calllogs|textmessages|voicemails)*
[shownames] [formatjson]
gam copy vaultquery <MatterItem> <QueryItem> [targetmatter <MatterItem"] [name <String>]
[shownames] [formatjson]
gam delete vaultquery <QueryItem> matter <MatterItem>
gam delete vaultquery <MatterItem> <QueryItem>
```
Added a variant of `gam print vaultcounts` that gets its query parameters from a saved Vault query.
```
gam print vaultcounts [todrive <ToDriveAttributes>*]
matter <MatterItem> <QueryItem>
[wait <Integer>]
```
### 7.22.05
Added a variant of `gam create vaultexport` that gets its query parameters from a saved Vault query.

View File

@@ -252,7 +252,7 @@ writes the credentials into the file oauth2.txt.
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
admin@server:/Users/admin$ gam version
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
GAM 7.22.05 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.22.06 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.7 64-bit final
MacOS Sequoia 15.6.1 x86_64

View File

@@ -43,6 +43,7 @@
<DomainNameList> ::= "<DomainName>(,<DomainName>)*"
<DriveFileACLRoleList> ::= "<DriveFileACLRole>(,<DriveFileACLRole>)*"
<DriveFileACLTypeList> ::= "<DriveFileACLType>(,<DriveFileACLType>)*"
<DriveFileIDList> ::= "<DriveFileID>(,<DriveFileID>)*"
<DriveFileList> ::= "<DriveFileItem>(,<DriveFileItem>)*"
<DriveFilePermissionList> ::= "<DriveFilePermission>(,<DriveFilePermission>)*"
<DriveFilePermissionIDList> ::= "<DriveFilePermissionID>(,<DriveFilePermissionID>)*"

View File

@@ -21,6 +21,9 @@
- [Display Vault Holds](#display-vault-holds)
- [Display Vault Holds Affecting a User](#display-vault-holds-affecting-a-user)
- [Vault Saved Queries](#vault-saved-queries)
- [Create Vault Saved Queries](#create-vault-saved-queries)
- [Copy Vault Saved Queries](#copy-vault-saved-queries)
- [Delete Vault Saved Queries](#delete-vault-saved-queries)
- [Display Vault Saved Queries](#display-vault-saved-queries)
- [Takeout](#takeout)
- [Copy a Takeout Bucket](#copy-a-takeoutbucket)
@@ -66,6 +69,8 @@
<ChatSpace> ::= spaces/<String> | space/<String> | <String>
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
<DriveFileID> ::= <String>
<DriveFileIDList> ::= "<DriveFileID>(,<DriveFileID>)*"
<ExportItem> ::= <UniqueID>|<String>
<ExportStatus> ::= completed|failed|inprogrsss
<ExportStatusList> ::= "<ExportStatus>(,<ExportStatus>)*"
@@ -202,11 +207,18 @@ Select fields to display:
* `fields <VaultMatterFieldNameList>` - Display selected fields; `matterId` and `name` are always displayed
## Display Vault Counts
Display item counts retained in Vault for the given users or groups.
### Display item counts retained in Vault using a saved Vault query.
```
gam print vaultcounts [todrive <ToDriveAttributes>*]
matter <MatterItem> <QueryItem>
[wait <Integer>]
```
### Display item counts retained in Vault for the given users or groups.
* The required argument `matter` specifies the matter name or ID (prefix with id:) where the count should be performed.
* The required argument `corpus` specifies whether Gmail mailbox data or Google Groups archives are queried.
* You need to specify one argument of accounts, orgunit or everyone to determine which users/groups to query.
* The `scope` argument specifies the data to be queried, `all_data` is the default and is recommended.
* You need to specify one argument of accounts, orgunit or everyone to determine which users/groups to query.
The command may take some time to complete; GAM makes repeated API calls until the operation is complete. By default,
GAM waits 15 seconds between API calls; use the `wait <Integer>` option to specify a different wait period.
@@ -214,12 +226,10 @@ GAM waits 15 seconds between API calls; use the `wait <Integer>` option to speci
This command can be useful for discovering legacy former employee accounts which no longer have any mail data retained by Vault.
```
gam print vaultcounts [todrive <ToDriveAttributes>*]
matter <MatterItem> corpus mail|groups
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
[(shareddrives|teamdrives (<TeamDriveIDList>|(select <FileSelector>|<CSVFileSelector>))) |
(rooms (<ChatSpaceList>|(select <FileSelector>|<CSVFileSelector>))) |
(sitesurl (<URLList>||(select <FileSelector>|<CSVFileSelector>)))]
[scope <all_data|held_data|unprocessed_data>]
matter <MatterItem>
corpus mail|groups
[scope all_data|held_data|unprocessed_data]
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone|entireorg
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timezone <TimeZone>]
[excludedrafts <Boolean>]
[wait <Integer>]
@@ -228,12 +238,13 @@ Specify the search method, this is optional:
* `accounts <EmailAddressEntity>` - Search all accounts specified in `<EmailAddressEntity>`
* `orgunit|org|ou <OrgUnitPath>` - Search all accounts in the OU `<OrgUnitPath>`
* `everyone` - Search for all accounts in the organization
* `shareddrives|teamdrives <SharedDriveIDList>` - Search for all accounts in the Shared Drives specified in `<SharedDriveIDList>`
* `shareddrives|teamdrives select <FileSelector>|<CSVFileSelector>` - Search for all accounts in the Shared Drives specified in `<FileSelector>|<CSVFileSelector>`
* `rooms <ChatSpaceList>` - Search in the Room specified in the chat rooms specified in `<ChatSpaceList>`
* `rooms <ChatSpaceList>` - Search in the Room specified in the chat rooms specified in `<FileSelector>|<CSVFileSelector>`
* `sitesurl <URLList>` - Search the published site URLs of new Google Sites in `<URLList>`
* `sitesurl <URLList>` - Search the published site URLs of new Google Sites specified in `<FileSelector>|<CSVFileSelector>`
For `corpus mail|group`, you can specify search terms to limit the search.
* `terms <String>` - [Vault search](https://support.google.com/vault/answer/2474474)
For `corpus mail|group`, you can specify time limits on the search:
* `start|starttime <Date>|<Time>` - The start time range for the search query. These timestamps are in GMT and rounded down to the start of the given date.
* `end|endtime <Date>|<Time>` - The end time range for the search query. These timestamps are in GMT and rounded down to the start of the given date.
Check the status of a previous count operation with the name from a previous command.
```
@@ -257,18 +268,20 @@ gam create vaultexport|export matter <MatterItem> [name <String>]
Create a Google Vault export request by specifying the query parameters.
```
gam create vaultexport|export matter <MatterItem> [name <String>] corpus calendar|drive|gemini|groups|hangouts_chat|mail|voice
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
(shareddrives|teamdrives (<TeamDriveIDList>|(select <FileSelector>|<CSVFileSelector>))) |
(rooms (<ChatSpaceList>|(select <FileSelector>|<CSVFileSelector>))) |
(sitesurl (<URLList>||(select <FileSelector>|<CSVFileSelector>)))
gam create vaultexport|export matter <MatterItem> [name <String>]
corpus calendar|drive|gemini|groups|hangouts_chat|mail|voice
[scope all_data|held_data|unprocessed_data]
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
(documentids (<DriveFileIDList>|(select <FileSelector>|<CSVFileSelector>))) |
(shareddrives|teamdrives (<SharedDriveIDList>|(select <FileSelector>|<CSVFileSelector>))) |
[(includeshareddrives <Boolean>)|(shareddrivesoption included|included_if_account_is_not_a_member|not_included)]
(sitesurl (<URLList>||(select <FileSelector>|<CSVFileSelector>)))
[driveversiondate <Date>|<Time>]
[includerooms <Boolean>]
(rooms (<ChatSpaceList>|(select <FileSelector>|<CSVFileSelector>))) |
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timezone <TimeZone>]
[locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
[responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
[(includeshareddrives <Boolean>)|(shareddrivesoption included|included_if_account_is_not_a_member|not_included)]
[driveversiondate <Date>|<Time>]
[includerooms <Boolean>]
(covereddata calllogs|textmessages|voicemails)*
[driveclientsideencryption any|encrypted|unencrypted]
[includeaccessinfo <Boolean>]
@@ -279,9 +292,9 @@ gam create vaultexport|export matter <MatterItem> [name <String>] corpus calenda
```
<MatterItem> specifies the matter name or ID the export should be associated with.
Specify the name of the export:
* `name <String>` - The export will be named `<String>`
* `default` - The export will be named `GAM <corpus> Export - <Time>`
If `name <String>` is omitted, the export will be named `GAM <corpus> Export - <Time>`
## Vault Query options
Specify the corpus of data, this option is required:
* `calendar`
@@ -296,12 +309,14 @@ Specify the search method, this option is required:
* `accounts <EmailAddressEntity>` - Search all accounts specified in `<EmailAddressEntity>`
* `orgunit|org|ou <OrgUnitPath>` - Search all accounts in the OU `<OrgUnitPath>`
* `everyone` - Search for all accounts in the organization
* `documentids <DriveFileIDList>` - Search for all drive files specified in `<DriveFileIDList>`
* `documentids select <FileSelector>|<CSVFileSelector>` - Search for all drive files specified in `<FileSelector>|<CSVFileSelector>`
* `shareddrives|teamdrives <SharedDriveIDList>` - Search for all accounts in the Shared Drives specified in `<SharedDriveIDList>`
* `shareddrives|teamdrives select <FileSelector>|<CSVFileSelector>` - Search for all accounts in the Shared Drives specified in `<FileSelector>|<CSVFileSelector>`
* `rooms <ChatSpaceList>` - Search in the Room specified in the chat rooms specified in `<ChatSpaceList>`
* `rooms <ChatSpaceList>` - Search in the Room specified in the chat rooms specified in `<FileSelector>|<CSVFileSelector>`
* `sitesurl <URLList>` - Search the published site URLs of new Google Sites in `<URLList>`
* `sitesurl <URLList>` - Search the published site URLs of new Google Sites specified in `<FileSelector>|<CSVFileSelector>`
* `rooms <ChatSpaceList>` - Search in the Room specified in the chat rooms specified in `<ChatSpaceList>`
* `rooms <ChatSpaceList>` - Search in the Room specified in the chat rooms specified in `<FileSelector>|<CSVFileSelector>`
Specify the scope of data to include in the export:
* `all_data` - All available data; this is the default
@@ -384,7 +399,7 @@ For `corpus calendar`, you can specify the format of the exported data:
For `corpus drive`, you can not specify the format of the exported data,
For `corpus gemini`, `format xml` is the only format of the exported data,
For `corpus gemini`, `format xml` is the only supported format of the exported data,
For `corpus groups`, `corpus hangouts_chat`, `corpus mail` and `corpus voice`, you can specify the format of the exported data:
* `format mbox` - Export in MBOX format, this is the default
@@ -785,6 +800,52 @@ gam <UserTypeEntity> show vaultholds|holds
```
## Vault Saved Queries
## Create Vault Saved Queries
```
gam create vaultquery <MatterItem> [name <String>]
corpus calendar|drive|gemini|groups|hangouts_chat|mail|voice
[scope all_data|held_data|unprocessed_data]
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
(documentids (<DriveFileIDList>|(select <FileSelector>|<CSVFileSelector>))) |
(shareddrives|teamdrives (<SharedDriveIDList>|(select <FileSelector>|<CSVFileSelector>))) |
[(includeshareddrives <Boolean>)|(shareddrivesoption included|included_if_account_is_not_a_member|not_included)]
(sitesurl (<URLList>||(select <FileSelector>|<CSVFileSelector>)))
[driveversiondate <Date>|<Time>]
[includerooms <Boolean>]
(rooms (<ChatSpaceList>|(select <FileSelector>|<CSVFileSelector>))) |
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timezone <TimeZone>]
[locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
[responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
(covereddata calllogs|textmessages|voicemails)*
[shownames] [formatjson]
```
If `name <String>` is omitted, the query is named `GAM <corpus> Query - <Time>`
The `shownames` argument controls whether org unit and shared drive names are displayed in queries; additional API calls are required to get the names.
See: [Vault Query options](#vault-query-options)
## Copy Vault Saved Queries
```
gam copy vaultquery <MatterItem> <QueryItem> [targetmatter <MatterItem>] [name <String>]
[shownames] [formatjson]
```
If `targetmatter <MatterItem>` is omitted, the query is copied in the source matter.
If `name <String>` is omitted:
* `targetmatter <MatterItem>` specified - The copied query has the same name as the source query
* `targetmatter <MatterItem>` omitted - The copied query is named `Copy of Source Query name`
The `shownames` argument controls whether org unit and shared drive names are displayed in queries; additional API calls are required to get the names.
## Delete Vault Saved Queries
```
gam delete vaultquery <QueryItem> matter <MatterItem>
gam delete vaultquery <MatterItem> <QueryItem>
```
## Display Vault Saved Queries
```
gam info vaultquery <QueryItem> matter <MatterItem>

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details
```
gam version
GAM 7.22.05 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.22.06 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.7 64-bit final
macOS Sequoia 15.7 x86_64
@@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00
Print the current version of Gam with details and time offset information
```
gam version timeoffset
GAM 7.22.05 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.22.06 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.7 64-bit final
macOS Sequoia 15.7 x86_64
@@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second
Print the current version of Gam with extended details and SSL information
```
gam version extended
GAM 7.22.05 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.22.06 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.7 64-bit final
macOS Sequoia 15.7 x86_64