← Back to team overview

dhis2-users team mailing list archive

Re: Web API: Organizatonal unit level property could not be query

 

Hi Octavio,

please have a look here for all *fields* options:
https://www.dhis2.org/doc/snapshot/en/user/html/ch31s07.html

On Thu, Sep 25, 2014 at 12:34 PM, Octavio GLORIO <
Octavio.GLORIO@xxxxxxxxxxxxxxxxx> wrote:

> Hi Olav,
> Thank you very much for the response. Now the process work as a charm.
> Octavio.
>
> -----Olav Poppe <olav.poppe@xxxxxx> escribió: -----
>
> Para: Octavio GLORIO <Octavio.GLORIO@xxxxxxxxxxxxxxxxx>
> De: Olav Poppe <olav.poppe@xxxxxx>
> Fecha: 25/09/2014 11:54
> cc: DHIS Users <dhis2-users@xxxxxxxxxxxxxxxxxxx>
> Asunto: Re: [Dhis2-users] Web API: Organizatonal unit level property could
> not be query
>
>
> Hi,
> you can specify which fields you need, including the levels: /api/
> organisationUnitLevels.json?fields=name,id,*level* etc…
>
> Olav
>
>
> 25. sep. 2014 kl. 11.46 skrev Octavio GLORIO <
> Octavio.GLORIO@xxxxxxxxxxxxxxxxx>:
>
> Hi all there,
> I have an automatic  process that create all the configuration of the DHIS
> by using the Web API and Pentaho data integration. However, I think that
> there is some changes in the API (since 2.16) that i do not understand
> well.  Basically, in certain point of the process, we query "organisationUnitLevels"
> and the "level" property. Specifically, we query in json format:
> http://localhost:8080/dhis/api/organisationUnitLevels.json. However, in
> new API this property do not come in the response. Furthermore, if you
> export level metadata you can notice that this property still exist in the
> system. Is this correct, it will be reimplemented or theres is no way to
> query this property of levels by using the API?. I have some workaround
> in mind, however, I will wait for some feedback in order to implemement.
> Thanks in advance for the response,
> Regards,
> Octavio.
>
> PD: Following some examples obtained through quering Web API:
>
> DHIS2 2.15
> {"organisationUnitLevels":[{"name":*"Health service*
> ","created":"2014-09-25T08:48:26.657+0000","lastUpdated":"2014-09-25T08:48:26.658+0000",
> *"level":5*,"href":"
> http://localhost:8080/dhis/api/organisationUnitLevels/GnFFYU3kK2F","id":"GnFFYU3kK2F"}
> .......
>
> DHIS2.16
>
> {"organisationUnitLevels":[{"id":"uO5PNJYm21A","created":"2014-09-15T13:16:58.456+0000","name":"*Health
> service*","lastUpdated":"2014-09-15T13:16:58.456+0000","href":"
> http://localhost:8080/dhis216/api/organisationUnitLevels/uO5PNJYm21A"}
> ..........
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>

References