Method: revisions.delete
Menghapus versi file secara permanen. Anda hanya dapat menghapus revisi untuk file dengan konten biner, 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/v2/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/docs
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-04 UTC.
[null,null,["Terakhir diperbarui pada 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"]]