Query a database
View as Markdown/v1/databases/{databaseId}/queryReturns one window of a view's rows (filtered, sorted, grouped), with the total and group counts. Pass viewId for a saved view, or view for an ad-hoc one (both: view overrides). uniqueId values are numbers (shown as prefix-number, e.g. LYD-12); filters take 12 or "LYD-12".
curl -X POST "https://api.lydie.co/v1/databases/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/query" \
-H "Authorization: Bearer $LYDIE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Path parameters
Body
- viewIdULID
- viewobject
Show 2 fieldsHide fields
- typestring
One of
tableboardlistcalendargalleryDefault
"table" - configViewConfigPatchInput
Default
{}Show 9 fieldsHide fields
- sortsobject[]
Show 2 fieldsHide fields
- directionstring
One of
ascdescDefault
"asc"
Show 6 fieldsHide fields
- directionstring
One of
ascdescDefault
"asc" - orderstring[]
- hideEmptyboolean
Hide groups with no rows (board columns).
- dateBucketstring
Date grouping; default month.
One of
dayweekmonthyear - collapsedstring[]
Board swimlanes.
Show 6 fieldsHide fields
- directionstring
One of
ascdescDefault
"asc" - orderstring[]
- hideEmptyboolean
Hide groups with no rows (board columns).
- dateBucketstring
Date grouping; default month.
One of
dayweekmonthyear - collapsedstring[]
- columnsViewColumnInput[]
Show 3 fieldsHide fields
- visibleboolean
Default
true
- summariesobject
propertyId → summary name
- layoutViewLayoutInput
Show 11 fieldsHide fields
- rowHeightstring
table
One of
shortmediumtallextra - wrapCellsboolean
table
board, gallery: px
board, gallery: the card image
- coverFitstring
One of
covercontain - markersstring
list
One of
bulletnumbernone calendar: the date property placing rows
- calendarModestring
One of
monthweek - showWeekendsboolean
- colorColumnsboolean
board
- extraobject
- windowobject
Default
{"offset":0,"limit":100} - todaystring
The caller's local date for relative date filters. Default: the server's.
Response
{
"total": 0,
"offset": 0,
"rows": [
{
"id": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
"title": "Meeting notes",
"sortKey": "a0",
"properties": {},
"createdAt": "2026-11-12T09:30:00.000Z",
"updatedAt": "2026-11-12T09:30:00.000Z",
"createdBy": null,
"updatedBy": null,
"group": null,
"subGroup": null,
"computed": {}
}
],
"groups": [
{
"key": null,
"subKey": null,
"count": 0,
"start": 0
}
]
}Errors use one envelope for every endpoint. See Errors and versions.