List Documents
Endpoint
GET /apiops/projects/{projectName}/knowledge-bases/{kbName}/documents/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| kbName | string | Yes | Knowledge base name (parent, resolved by name) |
Query Parameters
None
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"resultList": [
{
"id": "6651b3c4e4b0c3a2d1f0aaaa",
"knowledgeBaseId": "6650a1f2e4b0c3a2d1f09876",
"projectId": "6650a1f2e4b0c3a2d1f01234",
"fileName": "user-guide.pdf",
"contentType": "application/pdf",
"sizeBytes": 248193,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"status": "INDEXED",
"chunkCount": 42,
"uploadedAt": "2026-07-11T10:05:00Z",
"errorMessage": null
},
{
"id": "6651b3c4e4b0c3a2d1f0bbbb",
"knowledgeBaseId": "6650a1f2e4b0c3a2d1f09876",
"projectId": "6650a1f2e4b0c3a2d1f01234",
"fileName": "release-notes.md",
"contentType": "text/markdown",
"sizeBytes": 10482,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
"status": "PENDING",
"chunkCount": 0,
"uploadedAt": "2026-07-12T08:20:00Z",
"errorMessage": null
}
],
"resultCount": 2
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| resultList | array | List of document objects |
| resultCount | integer | Total number of documents returned |
Document Object Fields
| Field | Type | Description |
|---|---|---|
| id | string | Server-generated document identifier |
| knowledgeBaseId | string | Internal id of the parent knowledge base |
| projectId | string | Internal id of the owning project |
| fileName | string | Original uploaded file name |
| contentType | string | MIME type detected on upload |
| sizeBytes | integer | File size in bytes |
| sha256 | string | SHA-256 content hash (used for deduplication) |
| status | string | Processing status: PENDING, CHUNKED, INDEXED, ERROR |
| chunkCount | integer | Number of indexed chunks (read-only) |
| uploadedAt | string | ISO-8601 upload timestamp |
| errorMessage | string | Error detail when status is ERROR; null otherwise |
Document Status Values
PENDING- Uploaded, not yet processedCHUNKED- Text split into chunks; embedding generation in progressINDEXED- Chunks embedded and upserted to the VectorDB; queryableERROR- Processing failed at some stage; seeerrorMessage
EnumStatus
SUCCESS- Operation successfulFAILURE- Operation failed
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Knowledge base (name: product-docs) was not found!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/knowledge-bases/product-docs/documents/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Parent Resolved By Name: The knowledge base is resolved by
kbName; documents are then listed within that knowledge base and project. - Documents Addressed By Id: Each returned
idis what you pass to Get Document or Delete Document. Filenames are not unique within a knowledge base. - Internal Storage Reference Hidden: The document's internal storage reference (
gridFsFileId) is intentionally excluded. - Empty List: If the knowledge base has no documents, an empty
resultListis returned. - Permissions: Requires
AI_DEVELOPMENT+VIEWpermission in the project.
Related Documentation
- Upload Document - Add a document to the knowledge base
- Get Document - Get a single document by id
- Delete Document - Remove a document and its vectors
- Knowledge Bases API - Resource overview