Hi You can do something like this: /api/organisationUnits?filter=attributeValues.attribute.id: eq:ATTRIBUTE_ID&filter=attributeValues.value:eq:VALUE
You can read more about the object filter here: https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s06.html Please be aware that attributeValue paths are not currently optimised, so it means they will use in-memory filtering -- Morten On Sat, Mar 28, 2015 at 10:57 PM, Mahendra Kariya < mahendra.kar...@thoughtworks.com> wrote: > Hi, > > We have a few custom attributes for org units. For example, attribute > named "Type" can have values like "Hospital", "Dispensary", etc. > > We want to GET org units having particular attribute values through > /api/organisationUnits. Say, we want to GET all org units of type > "Hospital". > > What would be the easiest way to do this? >
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp