Method: properties.insert
Menambahkan properti ke file, atau memperbaruinya jika sudah ada.
Permintaan HTTP
POST https://www.googleapis.com/drive/v2/files/{fileId}/properties
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
fileId |
string
ID file.
|
Isi permintaan
Isi permintaan memuat instance Property
.
Isi respons
Jika berhasil, isi respons memuat instance Property
yang baru dibuat.
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
https://www.googleapis.com/auth/drive.metadata
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-05 UTC.
[null,null,["Terakhir diperbarui pada 2024-09-05 UTC."],[[["Adds or updates a property on a Google Drive file using the provided file ID."],["The request body must contain a `Property` object defining the property to add or update."],["Upon success, the API returns the newly created or updated `Property` object."],["Requires authorization using one of the specified OAuth scopes, some of which might require a security assessment."]]],["This document outlines the process of adding or updating a property on a file via a POST request. The request URL, using gRPC Transcoding syntax, targets a specific file ID. The request body contains a `Property` instance. Upon success, the response body returns the newly created `Property`. Access requires specific OAuth scopes, such as `drive`, `drive.file`, or `drive.metadata`; certain scopes might require a security assessment. The fileId will be included in the URL path.\n"]]