简体   繁体   English

特定用户的Google Drive导出(Google保险柜)

[英]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.

相关问题 如何导出特定谷歌驱动器文件夹中的数据? - How to export data in a specific google drive folder? 无法将NDVI层导出到Google云端硬盘 - Cannot Export NDVI Layer To Google Drive 有没有办法从 Google Vault Export 下载导出的数据? - Is there any way to download exported data from a Google Vault Export? 从 Google Vault API 导出查询结果时的 FAILD 状态 - FAILD status when export query result from Google Vault API 如何使用新 (v3) 谷歌驱动器 API 导出特定工作表 - How to export specific sheet using new (v3) google drive API 在驱动器中的特定文件夹中创建Google电子表格 谷歌驱动器api - create google spreadsheet in specific folder in drive | Google drive api 将数据框作为 csv 文件从 google colab 导出到 google drive - Export dataframe as csv file from google colab to google drive 无法将文件上传到 Google Drive 上的特定文件夹 - Trouble uploading file to a specific folder on Google Drive 如何在谷歌驱动器中搜索特定文件? - How to search for specific files in google drive? Python:将google驱动器中的文件复制到特定文件夹中 - Python: Copy a file in google drive into a specific folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM