Method: children.insert
HTTP リクエスト
POST https://www.googleapis.com/drive/v2/files/{folderId}/children
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
folderId |
string
フォルダの ID。
|
クエリ パラメータ
パラメータ |
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
一部のスコープは制限されているため、アプリで使用するにはセキュリティ評価が必要です。詳細については、承認ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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"]]