Method: permissions.delete
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
権限を削除します。
警告: 同じファイルに対する権限の同時操作はサポートされていません。最後に更新された内容のみが適用されます。
HTTP リクエスト
DELETE https://www.googleapis.com/drive/v3/files/{fileId}/permissions/{permissionId}
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
fileId |
string
ファイルまたは共有ドライブの ID。
|
permissionId |
string
権限の ID。
|
クエリ パラメータ
パラメータ |
supportsAllDrives |
boolean
リクエスト元のアプリケーションがマイドライブと共有ドライブの両方をサポートしているかどうか。
|
supportsTeamDrives (deprecated) |
boolean
非推奨: 代わりに、supportsAllDrives を使用してください。
|
useDomainAdminAccess |
boolean
ドメイン管理者としてリクエストを送信します。true に設定すると、ファイル ID パラメータが共有ドライブを参照し、リクエスト元が共有ドライブが属するドメインの管理者である場合、リクエスト元にアクセス権が付与されます。
|
enforceExpansiveAccess |
boolean
リクエストで広範なアクセス ルールを適用するかどうか。
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
成功した場合、レスポンスの本文は空の JSON オブジェクトになります。
認可スコープ
以下のいずれかの OAuth スコープが必要です。
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
一部のスコープは制限されており、アプリで使用するにはセキュリティ評価が必要です。詳しくは、認可ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Method: permissions.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDeletes a permission.\n\n**Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.\n\n### HTTP request\n\n`DELETE https://www.googleapis.com/drive/v3/files/{fileId}/permissions/{permissionId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|----------------------------------------------|\n| `fileId` | `string` The ID of the file or shared drive. |\n| `permissionId` | `string` The ID of the permission. |\n\n### Query parameters\n\n| Parameters ||\n|---------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `supportsAllDrives` | `boolean` Whether the requesting application supports both My Drives and shared drives. |\n| `supportsTeamDrives` **(deprecated)** | `boolean` Deprecated: Use `supportsAllDrives` instead. |\n| `useDomainAdminAccess` | `boolean` Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. |\n| `enforceExpansiveAccess` | `boolean` Whether the request should enforce expansive access rules. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `\n https://www.googleapis.com/auth/drive.file`\n\nSome scopes are restricted and require a security assessment for your app to use them. For more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]