List Knowledge bases accessible to the API key
Knowledge Folder API
List Knowledge bases
List Knowledge bases a workspace API key can already use
GET
List Knowledge bases accessible to the API key
Lists Knowledge bases the API key can already use. Use this endpoint to discover ids, names, roles, and file counts before you upload, search, or manage access.
Before You Start
- API key scope: Requires an API key with the
KNOWLEDGE_FOLDER_APIscope. Only workspace API keys receive Knowledge bases in this list. Personal keys return an empty list. See Share Knowledge bases with the API for setup instructions. - Knowledge bases: The Knowledge Folder API manages resources that appear as Knowledge bases in the Library.
Base URL
Request Format
Query Parameters
This endpoint lists Knowledge bases, not files. To list files inside one Knowledge base, use Retrieve Files.
Examples
List Knowledge bases with cURL
List Knowledge bases with JavaScript
Response Format
Success Response (200 OK)
role is EDITOR when the key has an explicit Editor grant. It is USER when the key has an explicit Viewer grant, or when the Knowledge base allows API search without an explicit key grant.
Results are ordered by createdAt descending, then id descending.
Example Response
Error Handling
An unknown
cursor returns 400 with "Invalid cursor".
There is no public endpoint to create or delete a Knowledge base.
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.
Authorizations
API key as Bearer token. Format "Bearer YOUR_API_KEY"
Query Parameters
Number of Knowledge bases to return. Default 50. Maximum 100.
Required range:
1 <= x <= 100UUID of the last Knowledge base from the previous page
Response
200
Knowledge bases retrieved successfully