Query records
Gets a list of records in a collection.
POST https://api.cogfy.com/collections/:collectionId/records/query
Path params
collectionId
: The id of the collection to query.
Request body
filter
: The page number to retrieve. Starts at 0. Defaults to 0.orderBy
: An array of objects with the field id the direction of the order.
Example:
{
"orderBy": [
{
"fieldId": "4685da73-bd54-42d2-b587-4b3486e3e619",
"direction": "asc"
},
{
"fieldId": "7cb79846-3a18-4456-9c7a-06ce124a0b45",
"direction": "desc"
}
],
"filter": {
"type": "and",
"and": {
"filters": [
{
"type": "equals",
"equals": {
"fieldId": "7e0bf906-544f-4a1e-af99-b16abe748cd2",
"value": "<string> | <number> | <boolean> | <uuid[]>"
}
},
{
"type": "fileType",
"fileType": {
"fieldId": "846f8131-6272-4704-94b6-c398c403ea11",
"value": "<string>"
}
},
{
"type": "greaterThan",
"greaterThan": {
"fieldId": "6ec778cd-1ddc-421b-9a7d-3191603dad56",
"value": "<string> | <number>"
}
},
{
"type": "greaterThanOrEquals",
"greaterThanOrEquals": {
"fieldId": "8e3fcffc-50a3-41a4-b56e-f270e49d789b",
"value": "<string> | <number>"
}
},
{
"type": "hasError",
"hasError": {
"fieldId": "eb0f0dcb-e3e8-4b63-9d0e-28cabd618b1d",
"value": "<boolean>"
}
},
{
"type": "isEmpty",
"isEmpty": {
"fieldId": "94f17ac9-b786-406e-9520-fe3d81bccd59",
"value": "<boolean>"
}
},
{
"type": "isPending",
"isPending": {
"fieldId": "12ebab2c-a05d-41d6-a124-b1a32dc0bb3b",
"value": "<boolean>"
}
},
{
"type": "lessThan",
"lessThan": {
"fieldId": "b1445745-8eb7-4fda-bd5e-12d920791e84",
"value": "<string> | <number>"
}
},
{
"type": "lessThanOrEquals",
"lessThanOrEquals": {
"fieldId": "0017cbd8-e57f-4f18-87eb-47ed575a1124",
"value": "<string> | <number>"
}
},
{
"type": "notEquals",
"notEquals": {
"fieldId": "7c879ac9-e3b3-4d91-af49-098aceeb8593",
"value": "<string> | <number> | <boolean> | <uuid[]>"
}
}
]
}
}
}
Response
Example JSON response:
{
"data": [
{
"id": "25d9e43c-a72a-48ca-98fe-971f8a6b68f5",
"properties": {
"249f76ee-08fd-4b2d-b089-166048deefce": {
"type": "text",
"text": {
"value": "Foo"
}
},
"03b132be-6d07-41ef-b466-a7584ec44cd6": {
"type": "text",
"text": {
"value": "Bar"
}
}
}
},
{
"id": "363d27b7-7f21-4027-9fb5-6beec576c792",
"properties": {}
}
],
"pageNumber": 0,
"pageSize": 50,
"totalSize": 2
}