pageSize parameter not working in enrollments API

Hello DHIS,

We are facing an issue with using the Enrollments API in our custom app. We have found that the pageSize parameter is not working as expected. Instead of returning only the requested number of items, all items are returned. We have raised this issue in JIRA (see:

We were wondering if there might be another method or workaround for setting the page size available?


Welcome back @Kris_Reinhardt! :slight_smile:

Thank you for your post and for creating a Jira bug issue! This does seem like a bug. Triaging to the developers and asking for a workaround.


Awesome - thank you for such quick action @Gassim :smiley:

1 Like

@Kris_Reinhardt, you are welcome! :smiley:

Actually, I was still looking at it and it turns out that when &totalPages=true is removed from the request the correct pageSize is returned. Using the link you posted in the issue:

Maybe request the totalPages separately for now? (edit: it seems that it will not work without the totalPages because it will only return the first items and there is no way to navigate?)

I hope this helps, and if it solves the issue please mark the post as solved. :smile: :+1:


Thanks again @Gassim - we’ll look into this workaround to see if it solves our issue and let you know.

1 Like