JS Call to Determine User Info

Hi All,

I’m writing a DHIS 2 app (a la the App Store) and I’d like to know if there is a JS call I can make to get information about the user I’m logged in as. Something similar to dhis2.de.currentDataSetId or dhis2.de.currentOrganisationUnitId but would look like dhis2.currentUser and at least give me the UID of the user if not their username/email.

Thanks,

Dan

Dan Cocos
BAO Systemswww.baosystems.com

T: +1 202-352-2671 | skype: dancocos

Hey Dan,

There are a few endpoints in the api you can call to get information see https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s27.html

A few examples:

https://apps.dhis2.org/dev/api/me

https://apps.dhis2.org/dev/api/me/authorization

Kind regards,

Mark Polak

mark@thedutchies.com

markpo@ifi.uio.no

+47 970 36 752

···

On 09 Oct 2014, at 20:54, Dan dan@dancocos.com wrote:

Hi All,

I’m writing a DHIS 2 app (a la the App Store) and I’d like to know if there is a JS call I can make to get information about the user I’m logged in as. Something similar to dhis2.de.currentDataSetId or dhis2.de.currentOrganisationUnitId but would look like dhis2.currentUser and at least give me the UID of the user if not their username/email.

Thanks,

Dan

Dan Cocos
BAO Systemswww.baosystems.com

T: +1 202-352-2671 | skype: dancocos


Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp