Method: properties.insert
Добавляет свойство в файл или обновляет его, если оно уже существует.
HTTP-запрос
POST https://www.googleapis.com/drive/v2/files/{fileId}/properties
URL-адрес использует синтаксис транскодирования gRPC .
Параметры пути
Параметры |
---|
fileId | string Идентификатор файла. |
Тело запроса
Тело запроса содержит экземпляр Property
.
Тело ответа
В случае успеха тело ответа содержит вновь созданный экземпляр Property
.
Области авторизации
Требуется одна из следующих областей OAuth:
-
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
Некоторые области ограничены, и для их использования требуется оценка безопасности вашего приложения. Дополнительную информацию см. в руководстве по авторизации .
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2024-10-30 UTC.
[null,null,["Последнее обновление: 2024-10-30 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"]]