Org Unit API

https://apps.dhis2.org/dev/api/organisationUnits?filter=level:eq:3

This is the new way of filtering properties, you can read about it at [1], there might be some performance issues with extremely large number of OUs, but we are building a criteria based filter for 2.17 (if we can get it ready in time).

[1] https://www.dhis2.org/doc/snapshot/en/user/html/ch32s06.html

···


Morten

On Sat, Aug 16, 2014 at 10:07 PM, Mahendra Kariya mahendra.kariya@thoughtworks.com wrote:

Hi,

We are customizing DHIS2 for MSF.

We were trying to get all org units at level 3 using http://localhost:8080/api/organisationUnits?level=3 but we are getting NullPointerException. Has the API changed or is it a bug?

Thanks,

Mahendra

ThoughtWorks

You can also combine multiple filters btw, not sure what you are looking for.

https://apps.dhis2.org/dev/api/organisationUnits?filter=level:eq:3&filter=parent.id:eq:O6uvpzGd5pu

···


Morten

On Sat, Aug 16, 2014 at 10:44 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

https://apps.dhis2.org/dev/api/organisationUnits?filter=level:eq:3

This is the new way of filtering properties, you can read about it at [1], there might be some performance issues with extremely large number of OUs, but we are building a criteria based filter for 2.17 (if we can get it ready in time).

[1] https://www.dhis2.org/doc/snapshot/en/user/html/ch32s06.html


Morten

On Sat, Aug 16, 2014 at 10:07 PM, Mahendra Kariya mahendra.kariya@thoughtworks.com wrote:

Hi,

We are customizing DHIS2 for MSF.

We were trying to get all org units at level 3 using http://localhost:8080/api/organisationUnits?level=3 but we are getting NullPointerException. Has the API changed or is it a bug?

Thanks,

Mahendra

ThoughtWorks

I think what you see in 2.16 is more or less stable, we will continue
fixing the backend and adding features, but we now hope we have something
that we don't need to change.

Of course, there is still some issues with the data format, you can't just
import data from /api/type/ID and PUT it back into /api/type/ID, this is
because the output is using our new system, and the input is still using
Jackson, its 99% there, but there a few minor issues.. I hope to have this
fixed in 2.17, so that we can do proper import/export from all endpoints
(but will probably still use Jackson for import, since we are not ready to
replace that yet).

As for properties etc, those can still change I guess, but I'm hoping that
we can more or less rely on what we have now, from time to time we will see
bugs (like the recect renaming of programTrackedEntityAttribute.attribute
=> programTrackedEntityAttribute.trackedEntityAttribute) that will be fixed.

We are also talking about adding versioning to our API, since I'm sure at
some point in the future we DO want to change/delete or update parts of our
data model, so we need something to help with that (so that we don't break
all our 3rd party apps/clients). I'm sure we can also do a better job at
announcing changes to the data model on the dev list, so at least people
will know that things changed (the big problem here is if you want to
support multiple DHIS versions with one app).

···

On Sun, Aug 17, 2014 at 2:04 AM, Mahendra Kariya < mahendra.kariya@thoughtworks.com> wrote:

We have another quick question. By when can we expect the API to be
completely stable?

--
Morten