← Back to team overview

dhis2-devs team mailing list archive

Re: Issue with Enrollments API Pagination - Not returning pager details

 

Hi

Did you have a look at the enrollment API docs? please try out
totalPages=true and see if it does what you want.

https://docs.dhis2.org/master/en/developer/html/webapi_enrollment_instance_query.html

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Wed, Nov 8, 2017 at 10:23 AM, Stian Sandvold <stian@xxxxxxxxx> wrote:

> Hi Jhansi,
>
> You can report bugs like these directly to Jira (http://jira.dhis2.org).
>
> I created a bug report for you, you can see it here:
> https://jira.dhis2.org/browse/DHIS2-2476
>
> Please add additional information in the comment section if you have
> something to add.
>
> On Wed, Nov 8, 2017 at 6:27 AM, Jhansi Reddy Karee <
> jhansirk@xxxxxxxxxxxxxxxx> wrote:
>
>> Hi Team,
>>
>> We are experiencing an issue with the enrollments API pagination on DHIS
>> 2.26 (it exists on the later versions of DHIS as well). When the
>> enrollments API is paginated, it returns the enrollments for the given
>> pageSize and the page number. But, *it doesn't return the pager params
>> as a part of each page response, like it returns in other APIs*. By
>> pager params we mean, paging details like total, pageSize, page, pageCount.
>>
>> Without the paging params it would be hard for us to figure out on how
>> many pages should we download and also at which page we should stop
>> downloading. Because of this issue, we are not able to paginate the
>> enrollments API.
>>
>> We are about to go live with programs with registration which would
>> internally use the enrollments API. We are expecting a lot of data entry to
>> be done in the near future. This means there will be a lot of enrollments
>> in the system and downloading all of them in a single API call, would be
>> problematic for our end users who are in remote locations with very slow
>> internet connectivity.
>>
>> *Will you be able to fix the pagination of enrollments API to return the
>> paging params, so that it is consistent with the other API’s paging
>> response *and we could also leverage it.
>>
>> Thanks,
>>
>> Madhoo/Jhansi
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Stian Sandvold
> Software developer, DHIS2
> University of Oslo
> http://www.dhis2.org
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References