Method: properties.insert
Dodaje właściwość do pliku lub aktualizuje ją, jeśli już istnieje.
Żądanie HTTP
POST https://www.googleapis.com/drive/v2/files/{fileId}/properties
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
fileId |
string
Identyfikator pliku.
|
Treść żądania
Treść żądania zawiera wystąpienie elementu Property
.
Treść odpowiedzi
Jeśli operacja się uda, treść odpowiedzi będzie zawierała nowo utworzoną instancję Property
.
Zakresy autoryzacji
Wymaga jednego z tych zakresów 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
Niektóre zakresy są objęte ograniczeniami, a aplikacja może z nich korzystać dopiero po sprawdzeniu zabezpieczeń. Więcej informacji znajdziesz w przewodniku po autoryzacji.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-09-05 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]