← Back to team overview

dhis2-users team mailing list archive

Re: Creating groups and group sets by using the API

 

Hi Morten

Is the 'members' necessary?

I just tried exporting a groupset from demo using the detailed metadata
export and I get rendered something like:

{"created":"2014-07-08T10:59:37.392+0000","dataElementGroupSets":[{"name":"Diagnosis","created":"2011-12-24T11:24:25.124+0000","lastUpdated":"2013-03-20T12:15:08.002+0000","shortName":"Diagnosis","description":"Diagnosis","compulsory":false,"dataDimension":true,"id":"jp826jAJHUc","dataElementGroups":[{"name":"Acute
Flaccid Paralysis (AFP)
","created":"2011-12-24T11:24:24.298+0000","lastUpdated":"2013-03-15T15:08:57.206+0000","id":"oDkJh5Ddh7d"},{"name":"All
Others","created":"2011-12-24T11:24:24.298+0000","lastUpdated":"2014-03-02T21:16:50.246+0000","id":"GBHN1a1Jddh"},{"name":"Anaemia","created":"2011-12-24T11:24:24.298+0000","lastUpdated":"2014-03-02T21:17:45.177+0000","id":"KmwPVkjp7yl"}
......

or is this a case where the output format is maybe not quite in line with
the input?

Bob

PS looks like some silly bugger has been messing with the admin password on
demo :-(



On 8 July 2014 11:56, Morten Olav Hansen <mortenoh@xxxxxxxxx> wrote:

> It should be "members" not "items", items is used for something else (its
> part of the dimensional model), you don't need the name (but it doesn't
> hurt, it just gets ignored)
>
>
> --
> Morten
>
>
> On Tue, Jul 8, 2014 at 5:06 PM, Octavio GLORIO <
> Octavio.GLORIO@xxxxxxxxxxxxxxxxx> wrote:
>
>> Hi,
>> I'm trying to create automatically data element groups and group sets by
>> using the API and Pentaho data integration. I had created data element
>> groups (empty groups) successfully. Then, I had tried to created a group
>> set and associate the corresponding groups by using the "items" property of
>> data elements group sets. The group sets had also been created, however,
>> the corresponding groups are not associated. Following, I have pasted a
>> small json that I'm using to reproduce the problem:
>>
>> *{"dataElementGroupSets":[{"name":"Laboratory
>> 3","items":[{"name":"MALARIA TESTING","id":"BIVjmofP0E4"}]}]}*
>>
>> "MALARIA TESTING" is a data element group created before and "Laboratory
>> 3" is the group set.  As I said, everything is created, however   "MALARIA
>> TESTING" is not linked to "Laboratory 3"
>>
>> Is this correct way to procedure? Is it possible to create this relations
>> with the API?
>>
>> Thanks in advance,
>> Octavio.
>>
>>
>> _______________________________________________
>> 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
>
>

Follow ups

References