Hi James, Adheesh is right here. User settings only supports a predefined list of keys. For app storage for user specific data structures you can use the user data store:
http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s70.html regards, Lars On Fri, Jul 1, 2016 at 5:05 PM, adheesh bhatia <adheeshbha...@gmail.com> wrote: > Hi James, > > AFAIK,* /api/userSettings* endpoint supports only pre-defined keys. You > can find the list of supported keys here: > *http://dhis2.github.io/dhis2-docs/master/en/developer/html/dhis2_developer_manual_full.html#d7336e11178 > <http://dhis2.github.io/dhis2-docs/master/en/developer/html/dhis2_developer_manual_full.html#d7336e11178>* > > A hack would be to store the custom user setting key in "systemSettings" > <http://dhis2.github.io/dhis2-docs/master/en/developer/html/dhis2_developer_manual_full.html#d7336e10745> > (as > it supports arbitrary keys). To associate the key with with the user, you > can probably use the userId in the key name. For example you can save a key > called "keyTestSetting_XYZ" in the system settings where "XYZ" is the > userId. > I am not sure if there is any other way to achieve this in DHIS 2.22 as > you rightly said that 'userDataStore' is only available in later versions. > > Regards > Adheesh > > > On Fri, Jul 1, 2016 at 7:12 PM, James Chang <jamesbch...@gmail.com> wrote: > >> Hi, >> >> 'userSettings' Web API in DHIS 2.22 have problem saving. (While it works >> well in DHIS 2.21) >> >> It keeps on saying "Key is not supported: ---KeyName---". >> >> The attached images are 'userSettings' with some key tried for ' >> play.dhis2.org/demo'. >> >> Could not use 'userDataStore' instead, since it is only available from >> DHIS 2.23. >> >> >> _______________________________________________ >> 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 >> >> > > > -- > Adheesh Bhatia > Chief Developer > BITS PIlani Goa Campus. > > _______________________________________________ > 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 > > -- Lars Helge Øverland Lead developer, DHIS 2 University of Oslo Skype: larshelgeoverland l...@dhis2.org http://www.dhis2.org <https://www.dhis2.org/>
_______________________________________________ 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