Querying Events API for null or empty value

Hi all,

Is there a way to filter empty or null values in an event API query?

I am facing to a problem to get event data via API.

The problem I am facing is that I can’t filter on empty or null values when I am trying to access to events which have empty or null values using an API query.

I’ve tried a query like this one: (https://play.dhis2.org/2.29/api/events.json?program=uy2gU8kT1jF&filter=XorIxxprsOp:EQ:0) but didn’t work.

Could someone help me on this?

Best regards,



See this https://docs.dhis2.org/master/en/developer/html/dhis2_developer_manual_full.html#d12616e5594

Unfortunately, we don’t have a mechanism to filter null values. Please report a jira issue and we will consider in our future release plan.


Abyot A. Gizaw.

Senior Engineer, DHIS2

University of Oslo


Is this still not supported in current versions?

Hi @mutali
May I ask please what are you trying to query exactly? It might be possible to use field transformers but I’m asking to make sure.


Hi @Gassim
What I wanted is to query and get all fields including the empty ones, is that possible with transformers? lets say on events endpoint.

Hi @mutali
Please share an example from play so I can test it as well.


@mutali were you able to find the solution to your question? Does this suggestion by @diallotafsir52 Querying and reading events help? I know that adding the fields=* shows all fields but also field transformers has the option to choose if you want specifically the empty fields using → ~isEmpty