Hi team , on this end point https://play.dhis2.org/2.38.4.3/api/events/eventRows.json?orgUnit=DiszpKrYNg8&ouMode[…]W&programStatus=ACTIVE&eventStatus=OVERDUE&pageSize=50&page=1 is there a way have number of pages? secondly filter fields to be displayed , lets same select only few attributes, is it supported ? if now which other endpoint that can achieve same results?
Hi @mutali
Just a curious question, how did you find /event/eventRows? I didn’t know it existed
I’d have suggested the endpoint /api/trackedEntityInstances
but I wasn’t able to show the paging there as well.
Could you share more about the use case and what the endpoint is supposed to return?
Have you tried using a SQL query instead and then using it as an API request? It might be possible to achieve the result you are looking for.
Thanks!
Hi @mutali
We can use totalPages=true
field in the api to get the total count and number of pages.
To have only selected fields in the response, we can use fields
field. Here is the details of it.
Thanks & Regards
R.Sri Laxmi Ragini
Thanks @Gassim I will try that method as well.
Why I want this is to have the list of overdue events and from there and I created a script to send reminders to the phone number assigned to TEI.
Thanks , those parameters do not work on the above endpoint
Hello @mutali,
According to the stoplight documentation, paging=true
should do the trick. But it does not seem to work for me. Perhaps it is a bug.