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.
Path Parameters
Project ID.
Request Body
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
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
Put the file in the Library
Either upload it via the chunked upload flow, or locate an existing file with List Items.
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.Track processing status
Poll List Documents until the new documents reach
okay.