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-02-27 UTC。
[null,null,["最終更新日 2025-02-27 UTC。"],[[["This document outlines the process for deleting a permission for a file or shared drive using the Google Drive API."],["The request requires specifying the `fileId` and `permissionId` as path parameters and can optionally include query parameters like `supportsAllDrives` and `useDomainAdminAccess`."],["The request body should be empty, and upon successful deletion, the response body will also be empty."],["Authorization is required using one of the specified OAuth scopes, which might require security assessment for restricted ones."],["Concurrent permission operations are not recommended as only the last update will be applied."]]],["This document outlines the process for deleting a permission associated with a file or shared drive. The core action is a `DELETE` HTTP request to a specified URL, including `fileId` and `permissionId` as path parameters. The request body must be empty. Optional query parameters, like `supportsAllDrives` and `useDomainAdminAccess`, modify the request's behavior. Successful deletion yields an empty JSON response. It is noted that concurrent operations on the same file are unsupported. The document list the needed Authorization scopes.\n"]]