Google Drive API v2:将文件所有权转移给管理员用户
Google Drive API v2: Transfer file ownership to admin user
超级管理员是否可以取得当前由任意用户拥有的文件的所有权?如果是这样,哪个端点可以做到这一点?我花了很多时间研究 API 文档,但我没有得出明确的答案。我发现的所有内容都与 API.
的第一版有关
是的,当前所有者可以将文件的所有权转让给其他用户。
https://developers.google.com/drive/v2/reference/permissions/update
transferOwnership boolean Whether changing a role to 'owner'
downgrades the current owners to writers. Does nothing if the
specified role is not 'owner'. (Default: false)
是的,这是可能的。
看看如何为"delegation of authority"使用oauth2。 https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority
阅读有关如何在 api.
上使用委托的驱动器 api 文档
查看更改所有权的驱动器 api。 https://developers.google.com/drive/v2/reference/permissions/update
关键部分是使用模拟该用户的服务帐户调用 api。
注意使用此方法的速率配额。如果你有很多文件要更改,你需要注意速度不要太快(比如每秒一个)。
超级管理员是否可以取得当前由任意用户拥有的文件的所有权?如果是这样,哪个端点可以做到这一点?我花了很多时间研究 API 文档,但我没有得出明确的答案。我发现的所有内容都与 API.
的第一版有关是的,当前所有者可以将文件的所有权转让给其他用户。 https://developers.google.com/drive/v2/reference/permissions/update
transferOwnership boolean Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'. (Default: false)
是的,这是可能的。
看看如何为"delegation of authority"使用oauth2。 https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority
阅读有关如何在 api.
上使用委托的驱动器 api 文档
查看更改所有权的驱动器 api。 https://developers.google.com/drive/v2/reference/permissions/update
关键部分是使用模拟该用户的服务帐户调用 api。
注意使用此方法的速率配额。如果你有很多文件要更改,你需要注意速度不要太快(比如每秒一个)。