Method: permissions.delete
删除文件或共享云端硬盘的权限。
警告:不支持对同一文件同时执行权限操作;系统只会应用上次更新时间。
HTTP 请求
DELETE https://www.googleapis.com/drive/v2/files/{fileId}/permissions/{permissionId}
网址采用 gRPC 转码语法。
路径参数
参数 |
fileId |
string
文件或共享云端硬盘的 ID。
|
permissionId |
string
权限的 ID。
|
查询参数
参数 |
supportsAllDrives |
boolean
发出请求的应用是否同时支持“我的云端硬盘”和共享云端硬盘。
|
supportsTeamDrives (deprecated) |
boolean
已废弃:请改用 supportsAllDrives 。
|
useDomainAdminAccess |
boolean
以网域管理员的身份发出请求;如果设为 true,则当文件 ID 参数引用了共享云端硬盘,且请求者是共享云端硬盘所属网域的管理员时,请求者将获得访问权限。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
某些范围受到限制,您的应用必须接受安全评估才能使用这些范围。有关详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-04。
[null,null,["最后更新时间 (UTC):2024-09-04。"],[[["Permanently deletes a specific permission from a file or shared drive, with only the latest update being applied in case of concurrent operations."],["Uses an HTTP DELETE request to the Google Drive API, requiring the file ID and permission ID as path parameters."],["Allows specifying whether the application supports My Drives and shared drives, or if the request should be made as a domain administrator, using query parameters."],["Needs authorization with one of the specified OAuth scopes related to Google Docs or Drive access."]]],["This document outlines the process of deleting a permission from a file or shared drive using a `DELETE` HTTP request to a specific URL. The request requires `fileId` and `permissionId` as path parameters. Optional query parameters include `supportsAllDrives`, `supportsTeamDrives` (deprecated), and `useDomainAdminAccess`. The request body must be empty, and a successful response is also empty. Authorization requires one of three OAuth scopes listed. Concurrent permissions updates on the same file are not supported.\n"]]