Method: revisions.delete
Löscht eine Dateiversion endgültig. Sie können Überarbeitungen nur für Dateien löschen, die binäre Inhalte enthalten, z. B. Bilder oder Videos. Überarbeitungen anderer Dateien, z. B. Google-Dokumente oder -Tabellen, sowie die letzte verbleibende Dateiversion können nicht gelöscht werden.
HTTP-Anfrage
DELETE https://www.googleapis.com/drive/v2/files/{fileId}/revisions/{revisionId}
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
fileId |
string
Die ID der Datei.
|
revisionId |
string
Die ID der Überarbeitung.
|
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.appdata
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-04 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-09-04 (UTC)."],[[["Permanently deletes a specified version of a file, applicable only to files with binary content like images or videos."],["Utilizes an HTTP DELETE request to `https://www.googleapis.com/drive/v2/files/{fileId}/revisions/{revisionId}`, requiring file and revision IDs."],["Requires an empty request body and returns an empty response body upon successful deletion."],["Needs authorization with one of the specified OAuth scopes, some of which may require a security assessment."]]],["This document outlines the process for permanently deleting a file revision using a `DELETE` HTTP request to a specific URL. The URL requires `fileId` and `revisionId` path parameters. The request body must be empty. A successful request results in an empty response body. Only revisions for files with binary content can be deleted. The operation requires one of four specified OAuth authorization scopes for authentication.\n"]]