← Back to team overview

dhis2-devs team mailing list archive

Re: SystemSettings API to post other data types

 

Hi Aravind,

you are correct. We only support string based values in the API at the
moment, which is a weakness. I think your suggestion makes sense. Could you
provide an example payload with type information the way you envision it?

best regards,

Lars


On Thu, May 15, 2014 at 10:40 AM, Aravind Muralikrishnan <
aravindm@xxxxxxxxxxxxxxxx> wrote:

> Hello all,
>
> While trying to store *"**keyHideUnapprovedDataInAnalytics"* as *false*using the system settings api, we realised that it stores it as a String,
> while the DefaultAnalyticsSecurityManager when reading the value back
> tries to type cast it to a Boolean and it fails.
>
> Right now, the system settings api does not expose an endpoint to store
> other data types except String.
>
> We were thinking of exposing another api all together, which can take a
> JSON as post body,
> ex: *{"keyHideUnapprovedDataInAnalytics":true}* and then store the values
> along with type information.
>
> Please suggest if there are better alternatives.
>
> Thanks,
> Aravind
>
> _______________________________________________
> 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