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 Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-09-05 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-09-05 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]