dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #08675
Re: API for reading categoryOptions per categoryOptionCombo
Hi Uwe,
try using field filtering like this:
https://play.dhis2.org/demo/api/categoryCombos/O4VaNks6tta.json?fields=id,categoryOptionCombos[categoryOptions[id,code,name]]
Docs here
<http://dhis2.github.io/dhis2-docs/2.21/en/developer/html/ch01s08.html>.
regards,
Lars
On Wed, Nov 25, 2015 at 10:52 AM, Uwe Wahser <uwe@xxxxxxxxx> wrote:
> Dear all,
>
>
> I am experimenting with the DHIS2-api within the context of loading bigger
> amounts of external data into a DHIS2 dataSet. At on point I need the codes
> of all categoryOptions involved in all categoryOptionCombos of a
> categoryCombo of a dataSet in order to join them against the codes in my
> external data for mapping purposes. I am currently using
> categoryCombos.categoryOptionCombos to get all the combos, and then
> categoryOptionCombos to get the involved categoryOptions.
>
>
> This means: I have to call the categoryOptionCombos-api once for each
> categoryOptionCombo (in the current test-setting already over 8000 with 5
> Categories and 4-12 Optiions each)
>
>
> I wonder if there is a more efficient api-access to get all
> categroyOptions per categoryCombo at one go. I don't want to access teh DB
> directly.
>
>
> Grateful for any ideas ...
>
>
> Regards, Uwe
>
> _______________________________________________
> 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
>
>
--
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.dhis2.org <https://www.dhis2.org>
Follow ups
References