GET /v2/knowledge-bases/{knowledge_base_id}/resources
List all files in the knowledge base (flat).
How to use
List resources and inspect processing status. Use cursor pagination and retain resource_id for detail reads. Do not treat a listed pending/parsed resource as indexed. Read successful resource payloads under data when a body is returned.
Authentication and permissions
Required permissions: kbs.read. Resource and owner access checks also apply.
Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header.
Optional identifier for the page that should be returned. If it is not provided, the first page will be returned.
NTUwZTg0MDAtZTI5Yi00MWQ0LWE3MTYtNDQ2NjU1NDQwMDAwNumber of items to be returned in the page.
50Direction for pagination: 'next' to advance through pages (older items), 'prev' to go back (newer items)
nextPossible values: Successful Response
Machine-readable response code, when provided.
Validation Error
curl --fail-with-body -sS \
"$STACKAI_BASE_URL/v2/knowledge-bases/${KNOWLEDGE_BASE_ID}/resources" \
-H "Authorization: Bearer $STACKAI_API_KEY"{
"response_code": "text",
"meta": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"data": [
{
"knowledge_base_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-01-01T00:00:00.000Z",
"modified_at": "2026-01-01T00:00:00.000Z",
"indexed_at": "2026-01-01T00:00:00.000Z",
"resource_id": "123e4567-e89b-12d3-a456-426614174000",
"resource_path": "text",
"acl_target_path": "text",
"dataloader_metadata": {
"^[^\\t\\n\\r\\f\\v]+$": null
},
"user_metadata": {
"^[^\\t\\n\\r\\f\\v]+$": null
},
"content_hash": "text",
"content_mime": "text",
"size": 1,
"status": "resource",
"effective_permissions": [
"text"
]
}
],
"next_cursor": "text",
"prev_cursor": "text",
"current_cursor": "text"
}Last updated
Was this helpful?

