← Back to team overview

dhis2-devs team mailing list archive

Re: Combination of categories are not being exposed in the API?

 

Hi Abyot,

it works! Thanks for the  info!



On Wed, Jun 29, 2016 at 11:32 AM, Abyot Asalefew Gizaw <abyot@xxxxxxxxx>
wrote:

> It should be possible to import, Morten can comment on that.
>
> We have it since 2.21. See our release note here
> <https://www.dhis2.org/221>
>
> May be we missed this in the documentation. We will update that part.
>
> --
> Abyot A. Gizaw.
> Senior Engineer, DHIS2
> University of Oslo
> http://www.dhis2.org
>
> On Wed, Jun 29, 2016 at 11:24 AM, Jose Garcia Muñoz <josemp10@xxxxxxxxx>
> wrote:
>
>>
>> Many thanks Abyott,
>>
>> are these attributes (attributeCc, attributeCos) documented? (at least I
>> can not see them in the event API documentation). are they working also for
>> 2.22 as well?
>>
>> Also is it possible to import events using those attributes?
>>
>> Thanks
>>
>> On Wed, Jun 29, 2016 at 11:18 AM, Abyot Asalefew Gizaw <abyot@xxxxxxxxx>
>> wrote:
>>
>>> Hi Jose,
>>>
>>> They are exposed. See a sample URL from my local db
>>>
>>>
>>> http://localhost:8082/api/events.json?orgUnit=YuQRtpLP10I&programStage=aNLq9ZYoy9W&;
>>> *attributeCc=O4VaNks6tta&attributeCos=C6nZpLKjEJr;i4Nbp8S2G6A*
>>> &pageSize=50&page=1&totalPages=true
>>>
>>> Note the params in bold:
>>>
>>> attributeCc = category combo
>>> attributeCos = category options (separated by semi colon)
>>>
>>> --
>>> Abyot A. Gizaw.
>>> Senior Engineer, DHIS2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Wed, Jun 29, 2016 at 10:57 AM, Jose Garcia Muñoz <josemp10@xxxxxxxxx>
>>> wrote:
>>>
>>>>
>>>> Dear devs,
>>>>
>>>> It seems that the combination of categories for programs are not being
>>>> exposed through the API. For example, unless I'm doing something wrong, the
>>>> following events can not be reached through the /api/events end point. Not
>>>> 100% sure as maybe there could a parameter in the API call to specify the
>>>> categorycombooption, but I couldn't find it in the documentation
>>>>
>>>> [image: Inline image 1]
>>>>
>>>>
>>>> So, can you confirm that the catcombo options are not being returned
>>>> through the API? In fact, it seems that the API is not retrieveing any of
>>>> those events, only the ones having this attribute as default.
>>>>
>>>> Also, and maybe more important, is it possible to send events with a
>>>> combination of categories as extradimension using the API? I don't think
>>>> so, but it will be great if you can also confirm this point :)
>>>>
>>>> Many thanks
>>>>
>>>> Regards
>>>> Jose
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>
>

PNG image


References