Method: revisions.delete
Menghapus versi file secara permanen. Anda hanya dapat menghapus revisi untuk file dengan konten biner di Google Drive, seperti gambar atau video. Revisi untuk file lain, seperti Google Dokumen atau Spreadsheet, dan versi file terakhir yang tersisa tidak dapat dihapus.
Permintaan HTTP
DELETE https://www.googleapis.com/drive/v3/files/{fileId}/revisions/{revisionId}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
fileId |
string
ID file.
|
revisionId |
string
ID revisi.
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons akan kosong.
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.appdata
https://www.googleapis.com/auth/drive.file
Beberapa cakupan dibatasi dan memerlukan penilaian keamanan agar aplikasi Anda dapat menggunakannya. Untuk informasi selengkapnya, lihat Panduan otorisasi.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-09-03 UTC.
[null,null,["Terakhir diperbarui pada 2024-09-03 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"]]