TEI and Enrollments API GET calls are not considering date range

Hi DHIS Team,

We are using below API calls to get the TrackedEntityInstance Ids and Enrollment Ids.

https://<host_name>/api/trackedEntityInstances?lastUpdatedStartDate=2018-06-17&lastUpdatedEndDate=2018-09-02&fields=trackedEntityInstance&ou=&ouMode=DESCENDANTS&page=5&pageSize=1000&program=&totalPages=true

http://<host_name>/api/enrollments?programEndDate=2018-08-05&programStartDate=2018-05-20&fields=enrollment&ou=&ouMode=DESCENDANTS&page=1&pageSize=1000&totalPages=true&program=

The above API calls returning the total number of ids but not returning any ids. Could you please help us to identify what we have done incorrect.

Thanks,

Rajeswari & Gaurav.

Hi Rajeswari,

please remove the page & pageSize and try again

Kind regards

Djibril

···

From: Dhis2-devs dhis2-devs-bounces+djibril=hisp.org@lists.launchpad.net On Behalf Of Rajeswari Gottipati
Sent: Tuesday, 28 August 2018 11:44 AM
To: dhis2-devs dhis2-devs@lists.launchpad.net; Morten Olav Hansen morten@dhis2.org; Lars Helge Øverland lars@dhis2.org
Cc: Evgenia ZELIKOVA evgenia.zelikova@paris.msf.org; Thomas RODRIGUEZ thomas.rodriguez@paris.msf.org; twmsf twmsf@thoughtworks.com; Anceline DUPOUY anceline.dupouy@paris.msf.org; Megan McGuire megan.mcguire@newyork.msf.org; Kristina Reinhardt kristina.reinhardt@newyork.msf.org; Sonia Diverres sonia.diverres@paris.msf.org
Subject: [Dhis2-devs] TEI and Enrollments API GET calls are not considering date range

Hi DHIS Team,

We are using below API calls to get the TrackedEntityInstance Ids and Enrollment Ids.

https://<host_name>/api/trackedEntityInstances?lastUpdatedStartDate=2018-06-17&lastUpdatedEndDate=2018-09-02&fields=trackedEntityInstance&ou=&ouMode=DESCENDANTS&page=5&pageSize=1000&program=&totalPages=true

http://<host_name>/api/enrollments?programEndDate=2018-08-05&programStartDate=2018-05-20&fields=enrollment&ou=&ouMode=DESCENDANTS&page=1&pageSize=1000&totalPages=true&program=<program>

The above API calls returning the total number of ids but not returning any ids. Could you please help us to identify what we have done incorrect.

Thanks,

Rajeswari & Gaurav.

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.