Object API Aggregation Terms

Hello,

Are aggregation terms in the Object API working as intended? I am following the tutorial of the documentation,

Using Aggregation Terms with REST APIs - Liferay Official Documentation - Liferay Learn

but not even the example aggregationTerms seem to be working correctly. Using “description” as a term works, but hardly even makes sense, but “dateModified” does not seem to be a supported term and only ever returns 404. Practically the only ones I got to work where “title”, “description”, and “id”, which is not very useful.

I am looking to get tagged categories to work as aggregation terms, but while that works in the search api using

{
"facetConfigurations": [
{
"name": "category"
}
]
}

as the post request body, I don’t have that option in the object api.

Version: DXP 2025.Q1

2 Answers

2

Hi @Simon_Maurer,

Like @RoselaineMarques mentioned, this looks like a :bug:.
I tested this both on 2025.q1 & master, both returned 404 errors.

I’ve made a request to update the documentation & shared the bug information as well.

Best,

Which liferay version are you using it?

We are currently on DXP 2025.Q1

Hi Simon, this looks like is a bug, is working always only for fields created by you in the Object, as dateModified is part of any custom Object, not a custom field added by you, is returning a 404. You can create a bug with it, and our support team will provide a hot-fix.