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 (שעון UTC).
[null,null,["עדכון אחרון: 2024-09-03 (שעון UTC)."],[[["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"]]