Retrieve files from a knowledge folder
Knowledge Folder API
Retrieve Files from Knowledge Folder
List all files in a knowledge folder or get details for a specific file
GET
Retrieve files from a knowledge folder
Documentation Index
Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
Use this file to discover all available pages before exploring further.
Using our API via a dedicated deployment? Just replace
api.langdock.com with your deployment’s base URL: <deployment-url>/api/publicRequires an API key with the
KNOWLEDGE_FOLDER_API scope. The knowledge folder must be shared with the API key. See Share Knowledge Folders with the API for setup instructions.Request Format
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
folderId | string | Yes | The ID of the knowledge folder |
Examples
List Files with cURL
List Files with JavaScript
Check Processing Status
Response Format
Success Response (200 OK)
Processing Status Values
| Status | Description |
|---|---|
UPLOADING | File is being uploaded |
UPLOADED | File is uploaded and queued for processing |
EXTRACTING | Text is being extracted from the file |
EMBEDDING | Embeddings are being generated |
SYNCED | File is ready for search |
ACTION_FAILED | Processing action failed |
EXTRACTION_FAILED | Text extraction failed |
EMBEDDING_FAILED | Embedding generation failed |
TIMEOUT | Processing timed out |
Example Response
Get Single File Details
To get details for a specific file, use theGET /knowledge/{folderId}/{attachmentId} endpoint:
Error Handling
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.