trackedEntityInstances endpoint paging not displayed

I noticed when querying the trackedEntityInstances endpoint, paging is not displayed at the top. If I use the below syntax, I would expect to see paging at the top, but I don’t. It just shows the first 50 TEIs.

https://url/api/trackedEntityInstances.json?ou=xxxxxxxxxx&program=xxxxxxxxxx&ouMode=DESCENDANTS

Likewise, if I add some paging parameters, such as &pageSize=10&page=2, I still don’t see paging (although it does show me records 11-20)

How can I force the paging information to be returned? I need it to facilitate pulling my data in smaller sections so that I don’t crash the server.

Note, there also seems to be a similar problem with the events endpoint. In this case, it shows the paging information but it always says there is only 1 page and the number of records you requested was 1. This is an example using
api/trackedEntityInstances.json?ou=xxxxxxxxxx&program=xxxxxxxxxx&ouMode=DESCENDANTS&pageSize=10&page=2

We would expect at minimum page=2; but also there are 1000’s of events, so it should show more than one page, and total > 0.

image

Best,
Kayla

Hi @kstankevitz,

Please what instance version are you using? Would you be able to reproduce this on any of the dhis2 play instances?

Thank you!

None of the play sites will load for me… are they down for some time every night? But once they come back online I can send some examples. This seems to work the same on all of the recent versions, but the screenshot I shared was from 2.35.9.

1 Like

I understand sometimes when they are down, I need to try each one until I find one that’s working. Speaking of which, did you know you can easily run DHIS2 for testing in a local container? Here’s the guide from the developers portal if you’re interested in that as well: https://developers.dhis2.org/docs/#running-dhis2-locally-in-a-container-optional

Maybe it was a bug which was fixed so it’d be better to test using the latest builds.

Thanks!