List workspace files
List files in the user's workspace.
When session_id is provided, only files for that session are returned. Otherwise, all files across sessions are listed. Results are paginated via limit/offset; has_more indicates whether additional pages exist.
The Artifacts page uses q for name search and origin to filter between Uploaded (user-uploaded) and Generated (agent/block output) files.
session_id (a per-session view) and the folder filters (folder_id / root_only) are distinct, mutually exclusive axes, and folder_id and root_only likewise conflict; passing conflicting filters returns a 400 rather than silently yielding an empty list.
Query parameters
Case-insensitive substring search on file name. Applied in the database for fresh results without waiting on embedding generation.
Case-insensitive substring search on file name. Applied in the database for fresh results without waiting on embedding generation.
Filter by file origin. uploaded matches files the user uploaded (metadata.origin == 'user-upload', set by the upload endpoint for both Builder and CoPilot uploads); generated matches everything else (agent/block output). Ignored when session_id is set.
Filter by file origin. uploaded matches files the user uploaded (metadata.origin == 'user-upload', set by the upload endpoint for both Builder and CoPilot uploads); generated matches everything else (agent/block output). Ignored when session_id is set.
Only return files in this folder.
Only return files in this folder.
Only return root-level files (not in any folder).
Only return root-level files (not in any folder).
Response
Successful Response
Changes
Changed in 4 of the 92 revisions of this API.358
- ○
added the new optional
queryrequest parameterfolder_idnew-optional-request-parameter
- ○
added the new optional
queryrequest parameterroot_onlynew-optional-request-parameter
- ○
added the optional property
files/items/folder_idto the response with the200statusresponse-optional-property-added
- ○
- ▲
removed the enum value
autopilotfrom the propertyanyOf[subschema #1]/of thequeryrequest parameteroriginrequest-parameter-property-enum-value-removed
- ▲
removed the enum value
builderfrom the propertyanyOf[subschema #1]/of thequeryrequest parameteroriginrequest-parameter-property-enum-value-removed
- ○
added the enum value
generatedto the propertyanyOf[subschema #1]/of thequeryrequest parameteroriginrequest-parameter-property-enum-value-added
- ○
added the enum value
uploadedto the propertyanyOf[subschema #1]/of thequeryrequest parameteroriginrequest-parameter-property-enum-value-added
- ○
added the required property
files/items/originto the response with the200statusresponse-required-property-added
- ▲
- ○
added the new optional
queryrequest parameteroriginnew-optional-request-parameter
- ○
added the new optional
queryrequest parameterqnew-optional-request-parameter
- ○
- ▲
removed the required property
files/items/originfrom the response with the200statusresponse-required-property-removed
- ●
deleted the
queryrequest parameterfolder_idrequest-parameter-removed
- ●
deleted the
queryrequest parameteroriginrequest-parameter-removed
- ●
deleted the
queryrequest parameterqrequest-parameter-removed
- ●
deleted the
queryrequest parameterroot_onlyrequest-parameter-removed
- ●
removed the optional property
files/items/folder_idfrom the response with the200statusresponse-optional-property-removed
This revision also has 96 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲