DEVCON 2026    |    2-5 November 2026 – QEII Centre – London, UK    |    Register now! 

Blogs

Beyond GET: Could HTTP QUERY (RFC 10008) Improve Liferay Headless APIs?

Exploring how the new HTTP QUERY method could simplify complex searches in Liferay Headless APIs.

Laxit Khanpara
Laxit Khanpara
読了時間: 3 分

Introduction

One of the biggest strengths of Liferay DXP is its Headless API ecosystem. Whether we're working with Custom Objects, Web Content, Documents, Commerce, or custom REST Builder APIs, Liferay provides well-designed REST endpoints that are easy to integrate with modern frontend applications.

For simple data retrieval, the existing APIs work extremely well.

For example:

GET /o/c/employees

Filtering is also straightforward:

GET /o/c/employees?filter=department eq 'IT'


However, as applications become more sophisticated, search requirements become significantly more complex. Dynamic filters, nested conditions, relationship queries, multiple sorting options, pagination, field selection, and AI-generated search requests can quickly turn a clean URL into something difficult to read and maintain.

Recently I came across RFC 10008, which introduces a new HTTP method named QUERY.

Although the RFC is still new and not yet widely supported by frameworks such as Spring Boot or Jakarta REST, it immediately made me think about Liferay Headless APIs and how this method could improve the developer experience in the future.

This article is not a proposal to replace existing APIs, but rather an exploration of how HTTP QUERY could fit naturally into Liferay's Headless ecosystem.

The Current Experience
Suppose we have a Liferay Object called Employee.

Today we retrieve records like this:

  • GET /o/c/employees


If we want filtering:

  • GET /o/c/employees?filter=(department eq 'IT' and salary gt 50000)


Sorting:

  • GET /o/c/employees?sort=name:asc


Pagination:

  • GET /o/c/employees?page=1&pageSize=20


Selecting fields:

  • GET /o/c/employees?fields=id,name,email


Liferay already provides excellent support for these features.

The challenge appears when all of these capabilities need to be combined into a single request.

A real-world URL may eventually contain:

  • complex filter expressions
  • nested logical operators
  • relationship filters
  • multiple sorting fields
  • pagination
  • selected fields
  • nested fields

The URL becomes increasingly difficult to understand.

Why GET Starts Showing Its Limits

ページコメント

Related Assets...

結果が見つかりません。

More Blog Entries...