curl --request GET \
--url https://asteragents.com/api/kb/files \
--header 'Authorization: Bearer <token>'{
"success": true,
"files": [
{
"id": 456,
"knowledgeBaseId": 123,
"fileId": "550e8400-e29b-41d4-a716-446655440000",
"fileName": "quarterly-report.pdf",
"fileKey": "org_xxx/uploads/550e8400-e29b-41d4-a716-446655440000/quarterly-report.pdf",
"contentKey": "org_xxx/contents/550e8400-e29b-41d4-a716-446655440000.md",
"contentType": "application/pdf",
"processingStatus": "completed",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:35:00.000Z",
"fileSize": 1048576,
"processingError": null,
"imageKeys": [
"org_xxx/images/file-uuid/page-1.png",
"org_xxx/images/file-uuid/page-2.png"
],
"userMetadata": {},
"extractedData": {}
}
]
}Retrieve all files associated with a knowledge base, including their processing status.
Use this to monitor file processing progress or display file lists in your UI.
curl --request GET \
--url https://asteragents.com/api/kb/files \
--header 'Authorization: Bearer <token>'{
"success": true,
"files": [
{
"id": 456,
"knowledgeBaseId": 123,
"fileId": "550e8400-e29b-41d4-a716-446655440000",
"fileName": "quarterly-report.pdf",
"fileKey": "org_xxx/uploads/550e8400-e29b-41d4-a716-446655440000/quarterly-report.pdf",
"contentKey": "org_xxx/contents/550e8400-e29b-41d4-a716-446655440000.md",
"contentType": "application/pdf",
"processingStatus": "completed",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:35:00.000Z",
"fileSize": 1048576,
"processingError": null,
"imageKeys": [
"org_xxx/images/file-uuid/page-1.png",
"org_xxx/images/file-uuid/page-2.png"
],
"userMetadata": {},
"extractedData": {}
}
]
}JWT token from Clerk authentication.
Must be from a user with org:admin role.
The ID of the knowledge base
123
Successfully retrieved files
Show child attributes
Database record ID
456
ID of the parent knowledge base
123
Unique file identifier (UUID)
"550e8400-e29b-41d4-a716-446655440000"
Original filename
"quarterly-report.pdf"
Storage path for the original file
"org_xxx/uploads/550e8400-e29b-41d4-a716-446655440000/quarterly-report.pdf"
Storage path for extracted text content
"org_xxx/contents/550e8400-e29b-41d4-a716-446655440000.md"
MIME type
"application/pdf"
Current processing status
parsing, parsed, chunking, chunk_failed, parse_failed, extract_failed, completed "completed"
When the file was associated
"2024-01-15T10:30:00.000Z"
When the file was last updated
"2024-01-15T10:35:00.000Z"
File size in bytes
1048576
Error message if processing failed
null
Storage paths for generated page images (PDFs only)
[
"org_xxx/images/file-uuid/page-1.png",
"org_xxx/images/file-uuid/page-2.png"
]Custom user-defined metadata
Structured data extracted from the file (if extraction schema is configured)