Method: revisions.delete
Безвозвратно удаляет версию файла. Вы можете удалять версии только файлов с двоичным содержимым на Google Диске, например изображений или видео. Версии других файлов, таких как Документы Google или Таблицы, а также последнюю оставшуюся версию файла удалить невозможно.
HTTP-запрос
DELETE https://www.googleapis.com/drive/v3/files/{fileId}/revisions/{revisionId}
URL-адрес использует синтаксис транскодирования gRPC .
Параметры пути
Параметры |
---|
fileId | string Идентификатор файла. |
revisionId | string Идентификатор редакции. |
Тело запроса
Тело запроса должно быть пустым.
Тело ответа
В случае успеха тело ответа пустое.
Области авторизации
Требуется одна из следующих областей OAuth:
-
https://www.googleapis.com/auth/drive
-
https://www.googleapis.com/auth/drive.appdata
-
https://www.googleapis.com/auth/drive.file
Некоторые области ограничены, и для их использования требуется оценка безопасности вашего приложения. Дополнительную информацию см. в руководстве по авторизации .
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2024-10-30 UTC.
[null,null,["Последнее обновление: 2024-10-30 UTC."],[[["Permanently deletes a specific version of a file in Google Drive, applicable only to files with binary content like images or videos."],["This action is not possible for revisions of Google Docs, Sheets, or the last remaining version of any file."],["Requires authorization with specific scopes such as `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/drive.appdata`, or `https://www.googleapis.com/auth/drive.file`."],["The request body should be empty and a successful operation results in an empty response body."],["Uses a DELETE request to `https://www.googleapis.com/drive/v3/files/{fileId}/revisions/{revisionId}` specifying the file and revision IDs as path parameters."]]],["This document outlines the process for permanently deleting a file version in Google Drive. A `DELETE` HTTP request is sent to a specific URL containing `fileId` and `revisionId` path parameters. The request body must be empty. Successful deletion, applicable only to binary content files (e.g., images, videos), results in an empty response body. The operation requires specific OAuth scopes for authorization, including `drive`, `drive.appdata`, or `drive.file`. Revisions for non-binary files or the last remaining version cannot be deleted.\n"]]