[英]Google Drive Export (Google Vault) for Specific User
Following the docs , there's an example to export all for a specific OU 在文档之后 ,有一个示例可以导出特定OU的所有示例
def create_drive_ou_all_data_export(service, matter_id):
ou_to_search = 'ou id retrieved from admin sdk'
drive_query_options = {'includeSharedDrives': True}
drive_query = {
'corpus': 'DRIVE',
'dataScope': 'ALL_DATA',
'searchMethod': 'ORG_UNIT',
'orgUnitInfo': {
'org_unit_id': ou_to_search
},
'driveOptions': drive_query_options,
'startTime': '2017-03-16T00:00:00Z',
'endTime': '2017-09-23T00:00:00Z',
'timeZone': 'Etc/GMT+2'
}
drive_export_options = {'includeAccessInfo': False}
wanted_export = {
'name': 'My first drive ou export',
'query': drive_query,
'exportOptions': {
'driveOptions': drive_export_options
}
}
return service.matters().exports().create(
matterId=matter_id, body=wanted_export).execute()
However, it does not show how to just export for a given user, is this possible? 但是,它没有显示如何仅导出给定用户,这可能吗? Also, where are all of the different body options for creating an export?
另外,用于创建导出的所有不同主体选项在哪里? The examples do not seem to show all of the parameters available.
这些示例似乎并未显示所有可用的参数。
You'd want to use searchMethod:account Reference Query: https://developers.google.com/vault/reference/rest/v1/Query Reference searchmethod: https://developers.google.com/vault/reference/rest/v1/Query#SearchMethod Reference AccountInfo: https://developers.google.com/vault/reference/rest/v1/Query#AccountInfo 您想使用searchMethod:account参考查询: https : //developers.google.com/vault/reference/rest/v1/Query参考搜索方法: https : //developers.google.com/vault/reference/rest/ v1 / Query#SearchMethod参考AccountInfo: https : //developers.google.com/vault/reference/rest/v1/Query#AccountInfo
drive_query = {
'corpus': 'DRIVE',
'dataScope': 'ALL_DATA',
'searchMethod': 'ACCOUNT', # This is different
'accountInfo': { # This is different
'emails': ['email1@company.com', 'email2@company.com', 'email3@company.com']
},
'driveOptions': drive_query_options,
'startTime': '2017-03-16T00:00:00Z',
'endTime': '2017-09-23T00:00:00Z',
'timeZone': 'Etc/GMT+2'
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.