DHIS-2 API

Hi,
can you please how to get a level 6 orgunit only by using DHIS-2 API;

I used this api but It Respone all org unit under specific org unit.

I want only level 6 org unit that uder specific org unit.

level=6 conditon not working. How to use it ?

URL:

API:/api/organisationUnits/cdp3S26sBwA.json?includeDescendants=true&level=6

Kindly Help me .

Hi Omer,

it seems you are right. Please report it as a bug in Jira. We will have a look at it.

regards,

Lars

···

On Wed, Sep 20, 2017 at 6:52 AM, Omer Butt omerbutt2521@gmail.com wrote:

Hi,
can you please how to get a level 6 orgunit only by using DHIS-2 API;

I used this api but It Respone all org unit under specific org unit.

I want only level 6 org unit that uder specific org unit.

level=6 conditon not working. How to use it ?

URL:

API:/api/organisationUnits/cdp3S26sBwA.json?includeDescendants=true&level=6

Kindly Help me .


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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Hi Omer

May be this works for you :

https://play.dhis2.org/demo/api/organisationUnits/ImspTQPwCqd?fields=children[id,level]&includeDescendants=true&filter=children.level:eq:3

Regards

harsh

···

On 20 September 2017 at 11:42, Lars Helge Øverland lars@dhis2.org wrote:

Hi Omer,

it seems you are right. Please report it as a bug in Jira. We will have a look at it.

regards,

Lars


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

On Wed, Sep 20, 2017 at 6:52 AM, Omer Butt omerbutt2521@gmail.com wrote:

Hi,
can you please how to get a level 6 orgunit only by using DHIS-2 API;

I used this api but It Respone all org unit under specific org unit.

I want only level 6 org unit that uder specific org unit.

level=6 conditon not working. How to use it ?

URL:

API:/api/organisationUnits/cdp3S26sBwA.json?includeDescendants=true&level=6

Kindly Help me .


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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Hi Omer,

Like Harsh says, just replace the level param with a filter. In your case it will be:

api/organisationUnits/cdp3S26sBwA.json?fields=children[id,name,level]&includeDescendants=true&filter=children.level:eq:6

···

On 20 September 2017 at 08:36, Harsh Atal harsh.atal@gmail.com wrote:

Hi Omer

May be this works for you :

https://play.dhis2.org/demo/api/organisationUnits/ImspTQPwCqd?fields=children[id,level]&includeDescendants=true&filter=children.level:eq:3

Regards

harsh


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

On 20 September 2017 at 11:42, Lars Helge Øverland lars@dhis2.org wrote:

Hi Omer,

it seems you are right. Please report it as a bug in Jira. We will have a look at it.

regards,

Lars


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

On Wed, Sep 20, 2017 at 6:52 AM, Omer Butt omerbutt2521@gmail.com wrote:

Hi,
can you please how to get a level 6 orgunit only by using DHIS-2 API;

I used this api but It Respone all org unit under specific org unit.

I want only level 6 org unit that uder specific org unit.

level=6 conditon not working. How to use it ?

URL:

API:/api/organisationUnits/cdp3S26sBwA.json?includeDescendants=true&level=6

Kindly Help me .


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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org