Views are admin-designed display configurations that query one or more Collections via a stored MongoDB aggregation pipeline, then render the results in the admin panel. Views require a MongoDB connection configured under Collections → Options.
| Stage | Purpose |
|---|---|
$match |
Filter documents by condition |
$lookup |
Left join from another collection |
$sort |
Sort documents |
$project |
Include or exclude fields |
$unwind |
Deconstruct an array field |
$addFields |
Compute and add new fields |
$group |
Group and aggregate |
$count |
Count documents |
$skip |
Skip documents (added automatically for pagination) |
$limit |
Limit documents (added automatically for pagination) |
Forbidden stages ($out, $merge, $function, $accumulator,
$graphLookup) are rejected at save and execution time.
On the Display tab, column definitions are a JSON array. Each object has a key
(dot-path into the result document) and a label.
[
{ "key": "data.name", "label": "Name" },
{ "key": "data.email", "label": "Email" },
{ "key": "orders", "label": "Orders" }
]
If no columns are defined, the preview auto-generates columns from the first result document.
Tick Public on the Access tab to expose the view via
GET /api/views/:slug/public without requiring a login.
Leave it unticked to require JWT authentication with one of the allowed roles.