← Back to team overview

dhis2-users team mailing list archive

Re: [Dhis2-devs] Sharing DEs and other objects via the API

 

Hi

What version of DHIS2 are you on?

To share objects with a N number of user they would have to be put into
their own user group, then all you have to do is to add:

"userGroupAccesses": [
  {"userGroup": {"id": "user-group-ID"}, "access": "rw------" }
]

To the objects

(assuming read-write, r------- if not)

This would have to be sent to /api/23/metadata or /api/24/metadata
(depending on which version you are on)

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Wed, Jul 27, 2016 at 3:03 PM, David Muturi <dnmuturi@xxxxxxxxx> wrote:

> Hi Dhis2 Team,
> I am trying to share a large number of data elements among st numerous
> user groups and it would be easier to bootstrap this via a script through
> the API, I am looking through the documentation and cannot find proper
> Payload syntax of sharing DES to multiple users. Any one who has done this
> before or atleast knows the syntax?
> rgds
> David
>
> _______________________________________________
> 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
>
>

Follow ups

References