drive_item_ids. Directories are recursively flattened to every descendant file before import, so importing a folder effectively imports its whole subtree in one call. Unsupported item types inside a directory are silently skipped.
For convenience, drive_item_ids also accepts two aliases:
MY_SPACE— import every file under the user’s workspace root in one call.ROOT— import every file the user has access to across the whole Library.
Permissions required (all of):
project:doc_add·instancedrive:item_read·service
drive:item_read is needed because the server resolves and reads each referenced drive item. If you’re uploading a new file end-to-end first, the Library upload calls (Create Upload and Create Item) additionally require drive:item_add.Path Parameters
string
required
Project ID.
Request Body
array
required
Library item IDs to import. Accepts file and directory IDs in any combination — directories are recursively flattened to all descendant files, and unsupported item types are silently skipped. The aliases
MY_SPACE (your workspace root) and ROOT (the whole Library) are also accepted.Response
object
After import, documents start out with status
pending and transition through running → okay (or error). Poll List Documents or Get Document to observe progress.Typical Flow
1
Put the file in the Library
Either upload it via the chunked upload flow, or locate an existing file with List Items.
2
Call Add Documents
Pass one or more
item_ids inside drive_item_ids. You can mix files and directories — passing a directory imports every descendant file in one call. Batch in a single request when you can; it is faster than looping.3
Track processing status
Poll List Documents until the new documents reach
okay.