Method: parents.delete
Menghapus induk dari file.
Permintaan HTTP
DELETE https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
fileId |
string
ID file.
|
parentId |
string
ID induk.
|
Parameter kueri
Parameter |
enforceSingleParent (deprecated) |
boolean
Tidak digunakan lagi: Jika item tidak ada di drive bersama dan induk terakhirnya dihapus, item tersebut akan ditempatkan di bawah root pemiliknya.
|
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.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."],[[["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"]]