dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24854
Re: Metadata api and groups/groupsets
Jason has just suggested posting the orgunit directly to the orgUnit
resource endpoint (together with its groups). That should work. Perhaps
there is a viewClass option I can use on the metaData option which achieves
the same result. I'll check ...
On 24 September 2013 17:22, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
> I've been grappling with a problem exporting and importing orgunit
> metadata which I'd like to share some thoughts on.
>
> Two dhis2 instances (in Rwanda) have slightly different sets of orgunits.
> So we are trying to rationalize and combine them - in most cases a union
> of the two with some shuffling around in the hierarchy.
>
> We have solved this pretty well but here is a challenge with group
> memberships. If I export all the orgunits from system A, together with
> their orgunitgroups, over to system B, one consequence is that the existing
> group memberships in A get replaced by those from B rather than appended.
> This is not the desired behaviour
>
> It doesn't look like we have an api method which will allow me to add an
> orgunit to an existing group. I could of course be missing something.
>
> Can we brainstorm a simpler but potentially more important case: adding a
> new orgunit, say Bob's Clinic, of type "Clinic" and Ownership "Faith
> Based". I can add Bob's Clinic easily enough by posting the metadata. Any
> suggestions for adding it to the "Clinic" and "Faith Based" groups.
> Currently I am resorting to downloading the entire groups metadata, adding
> to it where appropriate, then posting the whole list back.
>
> Is there a better way?
>
> Bob
>
References