← Back to team overview

dhis2-users team mailing list archive

Re: Quick way to edit users per role?

 

Perfect!  That will do it, thanks a ton!

From: Knut Staring [mailto:knutst@xxxxxxxxx]
Sent: Wednesday, 19 July 2017 5:56 PM
To: Edward Robinson <erobinson@xxxxxxxxxxxxxxxxxx>
Cc: dhis2-users <dhis2-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Dhis2-users] Quick way to edit users per role?

You can for example do things like this:
https://play.dhis2.org/demo/api/27/userCredentials.json?fields=username,userRoles[name]<https://play.dhis2.org/demo/api/27/userCredentials.json?fields=username,userRoles%5bname%5d>

On Wed, Jul 19, 2017 at 11:35 PM, Edward Robinson <erobinson@xxxxxxxxxxxxxxxxxx<mailto:erobinson@xxxxxxxxxxxxxxxxxx>> wrote:
Thanks Knut, I’ll play around with the API and report back if I get what I need.
Ed

From: Knut Staring [mailto:knutst@xxxxxxxxx<mailto:knutst@xxxxxxxxx>]
Sent: Wednesday, 19 July 2017 5:16 PM
To: Edward Robinson <erobinson@xxxxxxxxxxxxxxxxxx<mailto:erobinson@xxxxxxxxxxxxxxxxxx>>
Cc: dhis2-users <dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>>
Subject: Re: [Dhis2-users] Quick way to edit users per role?

Probably not exactly what you are looking for, but I think you could script around this endpoint:

https://docs.dhis2.org/master/en/developer/html/webapi_users.html#webapi_users_credentials_query

Knut

On Wed, Jul 19, 2017 at 7:42 PM, Edward Robinson <erobinson@xxxxxxxxxxxxxxxxxx<mailto:erobinson@xxxxxxxxxxxxxxxxxx>> wrote:
Is there a quick way to see all users assigned to a role and add / remove, or do I have to go through each user in the system to confirm their roles?
Ta!
Ed


_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp



--
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522<tel:+47%20918%2080%20522>
Skype: knutstar
http://dhis2.org



--
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522<tel:+47%20918%2080%20522>
Skype: knutstar
http://dhis2.org

References