k2
List files and folders in a knowledge base directory.
get/orgs/{org_id}/k2/{kb_id}/files
Path parameters
org_idstring required
kb_idstring required
Query parameters
page_tokenstring nullable
Page token for pagination
directorystring nullable
Scope listing to the immediate contents of one folder, like a file browser: the files directly in it plus a folder entry per immediate subfolder (one level only). Use "/" for the KB root. Omit to get a flat dump of every file in the knowledge base at all depths. Otherwise a normalized path such as docs/reports.
qstring nullable
Case-insensitive substring filter on entry name. When set, results are a flat recursive search: directory scopes the search to that folder's subtree (omit or use "/" to search the whole knowledge base) and no folder entries are synthesized.
Response
Files listed successfully