What is the Library?
The Library is a unified file system that holds every file MemoryLake can see. Project documents are always created by referencing a file that already lives in the Library. Your top-level writable folder isMY_SPACE — treat it as the root of your workspace. Every file or folder you create is placed under MY_SPACE (directly or nested inside a subfolder).
A typical integration flow looks like this:
1
Pick a destination folder
Use the alias
MY_SPACE to target your workspace root directly, or pass the item_id of any subfolder you’ve created under it.2
Upload the file into the Library
Chunked upload: create an upload session, PUT each chunk, then create the file item.
3
Import the file into a project
Call Import Documents with the
item_id returned from the previous step.Base URL
Item ID Aliases
Anywhere anitem_id is accepted, you can pass the alias MY_SPACE instead of a concrete ID.
MY_SPACE always resolves to your workspace root. Pass it directly whenever you would otherwise have to look up the root folder — for example as parent_item_id when creating a top-level file or folder.
Uploading a File (End-to-End)
File uploads are chunked. You receive one pre-signed PUT URL per chunk, upload each chunk, then finalize by creating afile item that references the upload.
1
Create the upload session
POST /api/v1/drives/items/upload with file_size in bytes. Returns an upload_id and a list of part_items — one pre-signed URL per chunk.2
Upload every chunk
PUT each chunk’s bytes to its upload_url. Save the ETag header from each response — you need them all.3
Create the file item
POST /api/v1/drives/items with item_type: "file" and from: { upload_id, part_etags }. Returns the new item_id.Python example
Name Conflicts
When creating a file or folder, pick a conflict strategy on the request:Endpoints
Get Item
Look up a file or folder by
item_id.List Items
Page through the contents of a folder.
Create Upload
Start a chunked upload session and get pre-signed URLs.
Create Item
Create a folder, or finalize an upload as a file item.
Delete Item
Delete a file or folder (recursive for folders).