← Back to team overview

dhis2-users team mailing list archive

Changes to web-api object filter in 2.19/2.20

 

Hi everyone

As part of a cleanup in the object filter in 2.20, we have decided to
change the default logic from OR to AND in the object filter, the current
situation was a bit chaotic where it was not always straight forward to
know if OR or AND was applied.

For the most part, this change should be welcome, and now queries like this
will work as expected:
/api/organisationUnits?filter=organisationUnitGroups.id:eq:ID123&parent.id:
eq:ID321

Where before it would return BOTH those who had that parent id and those
who where part of that group, now it will return only the results where
both conditions are true.

This also means that this no longer work:
/api/dataElements?filter=id:eq:ID1&filter=id:eq:ID2

But this can be replaced with the new IN operator in 2.19:
/api/dataElements?filter=id:in:[ID1,ID2]

--
Morten