Method: parents.delete
HTTP リクエスト
DELETE https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
fileId |
string
ファイルの ID。
|
parentId |
string
親の ID。
|
クエリ パラメータ
パラメータ |
enforceSingleParent (deprecated) |
boolean
非推奨: アイテムが共有ドライブ内に存在せず、最後の親が削除されると、そのアイテムはオーナーのルート下に配置されます。
|
リクエスト本文
リクエストの本文は空にする必要があります。
レスポンスの本文
成功すると、レスポンスの本文は空になります。
認可スコープ
次の 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 Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-03 UTC。
[null,null,["最終更新日 2024-09-03 UTC。"],[[["This document outlines the process for removing a parent from a Google Drive file using the `DELETE` HTTP request method and specific path parameters."],["Required path parameters are `fileId` for the target file and `parentId` to specify the parent being removed."],["The request body should be empty, and a successful operation results in an empty response body."],["Authorization is necessary using one of the listed OAuth scopes, including `https://www.googleapis.com/auth/docs`, `https://www.googleapis.com/auth/drive`, or `https://www.googleapis.com/auth/drive.file`."]]],["This document outlines the process to remove a parent from a file using a `DELETE` HTTP request. The request requires two path parameters: `fileId` (the file's ID) and `parentId` (the parent's ID). It may include a deprecated query parameter `enforceSingleParent`. The request body must be empty and the successful response body is also empty. Authorization requires specific OAuth scopes: `docs`, `drive`, or `drive.file`.\n"]]