List documents.
Changed onList documents with optional grouping support.
Supports two modes:
- Regular listing: Returns flat list of documents with pagination
- Grouped listing: When group_by is specified, returns documents grouped by field value
When using group_by:
- Requires a payload index on the specified field in the vector store
- Pagination applies to groups, not individual documents
- Each group contains all documents sharing the same field value
Request
- Base URL: https://api.mixpeek.com
- URL: https://api.mixpeek.com/v1/collections/{collection_identifier}/documents
- Auth: HTTP bearer and API key in header X-Namespace
Path parameters
The ID of the collection to list documents from.
Query parameters
Generate presigned URLs for S3-backed blobs and url-shaped fields. Also accepted as a body field — if either is true, presigning is enabled.
Include vector embeddings in results. Also accepted as a body field — if either is true, vectors are returned.
URL-encoded JSON filter (LogicalOperator shape: {"AND":[{"field":"metadata.status","operator":"eq","value":"active"}]}; OR/NOT also supported). Applies to the GET listing. POST /documents/list callers should send filters in the JSON body instead — the body wins when both are present. Invalid JSON returns 422 (never silently ignored).
Free-text search across common document fields. Body search wins when both are set.
Sort spec as JSON ({"field":"created_at","direction":"desc"}) or the compact "field:direction" form. Body sort wins when both are set.
Request body
Example request
{
"filters": {
"AND": [
{
"field": "name",
"operator": "eq",
"value": "John"
},
{
"field": "age",
"operator": "gte",
"value": 30
}
],
"OR": [
{
"field": "status",
"operator": "eq",
"value": "active"
},
{
"field": "role",
"operator": "eq",
"value": "admin"
}
],
"NOT": [
{
"field": "department",
"operator": "eq",
"value": "HR"
},
{
"field": "location",
"operator": "eq",
"value": "remote"
}
],
"case_sensitive": true
},
"sort": {
"field": "created_at"
},
"partition": {
"count": 4
},
"group_by": "source_object_id",
"select": [
"metadata.title",
"content"
],
"expand": [
"customer_id"
]
}Response
Successful Response
Example response
{
"description": "Regular document list (no grouping)",
"pagination": {
"has_more": false,
"limit": 10,
"offset": 0,
"total_count": 1
},
"results": [
{
"collection_id": "col_articles",
"document_id": "doc_123",
"metadata": {
"title": "AI Article"
}
}
],
"stats": {
"avg_blobs_per_document": 1,
"total_documents": 1
}
}Changes
- info
added the new optional request property
- info
- warning
removed the optional property
from the response with the status - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- warning