menu_book Navigation menu

Querying (Filtering, Sorting, Pagination)

The Pragma CMS API uses standard URL query parameters to modify the result set.

1. Multilingual Filtering (lang_id)

By default, the API falls back to the system's default language. You can explicitly request data in a specific language by passing the lang_id or lang-id parameter.

TEXT
GET /api/content?action=list&type=product&page=2&limit=20

The response payload will automatically include a meta object containing pagination details:

TEXT
{
  "success": true,
  "data": [...],
  "meta": {
    "pagination": {
      "total": 145,
      "page": 2,
      "limit": 20,
      "pages": 8
    }
  }
}

3. Universal Search (search)

When querying lists, taxonomies, or using the global search.php endpoint, pass the search parameter to trigger a LIKE database query.

TEXT
GET /api/taxonomies_terms?type=category&search=tech

4. Hierarchical Fetching (parent-id)

For entities that support nesting (like Menu Items or Taxonomy Terms), you can lazily load children nodes to avoid fetching massive trees at once.

TEXT
GET /api/menu_items?action=get-children&parent-id=14&offset-children=0&limit-children=10