Method: children.insert
طلب HTTP
POST https://www.googleapis.com/drive/v2/files/{folderId}/children
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المَعلمات |
folderId |
string
رقم تعريف المجلد.
|
معلمات طلب البحث
المَعلمات |
enforceSingleParent (deprecated) |
boolean
مهملة: لم تعُد إمكانية إضافة ملفات إلى مجلدات متعددة متاحة. يمكنك استخدام shortcuts كبديل.
|
supportsAllDrives |
boolean
ما إذا كان التطبيق الذي يقدّم الطلب متوافقًا مع كل من "ملفاتي" ومساحات التخزين السحابي المشتركة.
|
supportsTeamDrives (deprecated) |
boolean
متوقّفة نهائيًا: يمكنك استخدام supportsAllDrives بدلاً منها.
|
نص الطلب
يحتوي نص الطلب على مثال ChildReference
.
نص الاستجابة
إذا كانت الاستجابة ناجحة، يحتوي نص الاستجابة على مثيل ChildReference
تم إنشاؤه حديثًا.
نطاقات التفويض
يتطلب استخدام أحد نطاقات 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
تكون بعض النطاقات محظورة وتتطلب تقييمًا أمنيًا من تطبيقك لاستخدامها. لمزيد من المعلومات، راجِع دليل التفويض.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-09-03 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-09-03 (حسب التوقيت العالمي المتفَّق عليه)"],[[["This endpoint inserts a file into a specified folder within Google Drive using an HTTP POST request."],["The request requires a `folderId` path parameter to identify the target folder and accepts optional query parameters like `supportsAllDrives`."],["A `ChildReference` object is provided in the request body to specify the file to be inserted, and a newly created `ChildReference` is returned in the response upon success."],["Authorization is required with one of the listed OAuth scopes, such as `https://www.googleapis.com/auth/drive` or `https://www.googleapis.com/auth/drive.file`."]]],["The core action is inserting a file into a folder using a POST request to `https://www.googleapis.com/drive/v2/files/{folderId}/children`. The `folderId` is a required path parameter. Query parameters include `enforceSingleParent`, `supportsAllDrives`, and `supportsTeamDrives` with the latter two replacing the former. The request and response bodies use the `ChildReference` instance. Authorization requires specific OAuth scopes like `https://www.googleapis.com/auth/drive` and others, with some requiring security assessments.\n"]]