Skip to content

Filters

Filters are used to get specific content in REST API.

Example: filter news pages by status ‘draft’

Section titled “Example: filter news pages by status ‘draft’”

As query parameter, you can use filters to get specific content by field in REST API.

GET /api/cms/news?filter=status=draft
{
"time": {
// ...
},
"total": 2,
"filtered": 1,
"count": 1,
"pk": "id",
"rows": [
{
"id": "8c16854ca914",
"slug": "novina-1",
"title": "Новина 1",
"status": "published",
"published_at": "2025-07-10 00:00:00",
"meta": {
"title": "SEO Title",
"description": "SEO Description",
"keywords": "cms"
},
"created_at": "2025-07-08 09:18:12.017539",
"updated_at": "2025-07-10 12:52:23.428295",
"created_by": null,
"updated_by": "2025-07-08 09:18:12.017539+03"
}
],
"columns": [
// ...
],
"filters": [],
"preview_path": null,
"custom": true
}

Example: find news page by keyword ‘Breaking’

Section titled “Example: find news page by keyword ‘Breaking’”

As query parameter, you can search by keyword in title and slug fields in REST API.

GET /api/cms/news?filter=search=Breaking
{
"time": {
// ...
},
"total": 2,
"filtered": 1,
"count": 1,
"pk": "id",
"rows": [
{
"id": "8c16854ca914",
"title": "Breaking News",
"slug": "novina-1",
//...
},
// ...
]
}

Example: find 3 news pages with status ‘draft’

Section titled “Example: find 3 news pages with status ‘draft’”

As query parameter, you can limit the number of results returned in REST API.

GET /api/cms/news?filter=status=draft&limit=3
{
"time": {
// ...
},
"total": 5,
"filtered": 3,
"count": 3,
"pk": "id",
"rows": [
{
"id": "8c16854ca914",
"slug": "novina-1",
"status": "draft",
//...
},
{
"id": "8c16854ca915",
"slug": "novina-2",
"status": "draft",
//...
},
{
"id": "8c16854ca916",
"slug": "novina-3",
"status": "draft",
//...
},
// ...
],
"columns": [
// ...
],
"filters": [],
"preview_path": null,
"custom": true
}

Example: find published news by date in descending order (newer first)

Section titled “Example: find published news by date in descending order (newer first)”

As query parameter, you can sort the results by a specific order (asc or desc) in REST API.

GET /api/cms/news?filter=status=published&order=published_at&desc=true
{
"time": {
// ...
},
"total": 5,
"filtered": 2,
"count": 2,
"pk": "id",
"rows": [
{
"id": "8c16854ca914",
"slug": "novina-2",
"title": "Новина 2",
"status": "published",
"published_at": "2025-07-10 00:00:00",
//...
},
{
"id": "c75763dc8ee7",
"slug": "novina-1",
"title": "Новина 1",
"status": "published",
"published_at": "2025-07-08 00:00:00",
//...
}
],
"columns": [
// ...
],
"filters": [],
"preview_path": null,
"custom": true
}