Neither paging nor skipPaging filter works for events and enrollments API 2.38.2.1

The events and enrollments APIs return paginated data even with paging set to false or skipPaging set to true. DHIS2 version: 2.38.2.1.

Hi @Hiwot_Chichaybelu, welcome to the community! :tada:

In response to your inquiry, I would suggest two things:

  1. You can completely disable paging by adding the ‘paging=false’ parameter. For example https://xxdomainxx/api/tracker/events.json?orgUnit=xxxxxxxxx&ouMode=DESCENDANTS&program=xxxxxxxxx&occurredAfter=2022-01-01&occurredBefore=2022-12-31&paging=false. Or,
  2. You can increase the page size of the data being loaded/downloaded by adding ‘pageSize=1000’ parameter. For example https://xxdomainxx/api/tracker/events.json?orgUnit=xxxxxxxxx&ouMode=DESCENDANTS&program=xxxxxxxxx&occurredAfter=2022-01-01&occurredBefore=2022-12-31&pageSize=500

For more information, check out the Documentation.

I hope our response is able to solve the issue you were facing.

With :heavy_heart_exclamation: from the Dhistance Team.

DHISTANCE.com: The Easiest DHIS2 Setup. Up and running in 5 minutes!

No technical knowledge needed! Great Support with Data Security/Confidentiality.

1 Like

Thanks @e4eDHIS2!

@Hiwot_Chichaybelu welcome to the community! :tada:

Could you please share the API request URL (without the main domain)?

Thank you!

Thanks @Gassim I’m using the old APIs api/enrollments and api/events

Thanks! Please share the URL so I could test on play.dhis2.org :+1:

api/enrollments?ou=FETQ6OmnsKB&paging=false
api/events?paging=false

1 Like

Hi Hiwot :wave:

Thanks for letting us know about this. This appears to be a bug, so we’ve opened a new issue: [DHIS2-14476] - Jira. There’s been some related fixes, so I think some of them (e.g. api/events?skipPaging=true) are actually already working again in the most recent DHIS2 builds.

Just in case you do want to retrieve everything at once (and that won’t crash your server :sweat_smile:), you could also try setting pageSize parameter to some very high number (or you can also check the actual total number of records by setting totalPages=true)

2 Likes