Method: parents.delete
Entfernt ein übergeordnetes Element aus einer Datei.
HTTP-Anfrage
DELETE https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
fileId |
string
Die ID der Datei.
|
parentId |
string
Die ID des übergeordneten Elements.
|
Abfrageparameter
Parameter |
enforceSingleParent (deprecated) |
boolean
Eingestellt: Wenn sich ein Element nicht in einer geteilten Ablage befindet und das letzte übergeordnete Element entfernt wird, wird es in das Stammverzeichnis des Eigentümers verschoben.
|
Anfragetext
Der Anfragetext muss leer sein.
Antworttext
Wenn der Vorgang erfolgreich ist, ist der Antworttext leer.
Autorisierungsbereiche
Erfordert einen der folgenden OAuth-Bereiche:
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
Einige Bereiche sind eingeschränkt und erfordern eine Sicherheitsprüfung, damit Ihre App sie verwenden kann. Weitere Informationen finden Sie im Leitfaden zur Autorisierung.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-09-03 (UTC).
[null,null,["Zuletzt aktualisiert: 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"]]