← Back to team overview

dhis2-users team mailing list archive

Re: [Dhis2-devs] POST calls are not working in SystemSettings API - DHIS2 2.29

 

Thanks David !!

On Tue, Jun 26, 2018 at 7:17 PM David Huser <dhuser@xxxxxxxxxxxxxx> wrote:

> Hi Gaurav,
>
> According to 2.29 upgrade notes <https://www.dhis2.org/229-upgrade>,
> custom systemSettings keys are not supported anymore but the dataStore API
> should behave similarly.
>
> Regards,
> David
>
> On Tue, Jun 26, 2018 at 9:20 AM Kumar Shahdeo <gauravns@xxxxxxxxxxxxxxxx>
> wrote:
>
>> Hi All,
>>
>> We are using DHIS2 2.29.
>> When we made systemSettings (https://<instance>/api/systemSettings?key=MY_KEY)
>> GET call the response is as below
>> {"MY_KEY": {
>>         "MyKeyInfo": [
>>             "val1",
>>             "val2"
>>         ]
>>     }
>> }
>> We were trying to make POST call to update the value for key "MY_KEY" as
>> below
>> url: https://<instance>/api/systemSettings
>> Content-Type: "application/json"
>> body:
>> {
>> "MY_KEY": {
>>         "MyKeyInfo": [
>>             "val1",
>>         ]
>>     }
>> }
>> We recieved response with error message as
>> {
>>     "httpStatus": "Conflict",
>>     "httpStatusCode": 409,
>>     "status": "ERROR",
>>     "message": "Key(s) is not supported: MY_KEY"
>> }
>> Also, we have tried making POST calls with https://<instance>/api/systemSettings/MY_KEY
>> with values as a part of body in json format. We got the same error
>> response.
>>
>> We are able to make POST call for DHIS key(s) listed in the DHIS2.29
>> documentation, However POST calls with our keys are failing.
>> Could you please help us to resolve this issue.
>>
>> Regards
>> Gaurav & Raaji
>> _______________________________________________
>> 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
>>
>
>
> --
>
>
> *David Huser*
> DHIS2 Support Specialist
> dhuser@xxxxxxxxxxxxxx | https://baosystems.com |  2900 K Street, Suite
> 507, Washington D.C. 20007
>


-- 
Kumar Gaurav Nath Shahdeo
Developer
Email gauravns@xxxxxxxxxxxxxxxx
Telephone +91 9160688935 <javascript:void(0);>
[image: ThoughtWorks]
<http://www.thoughtworks.com/?utm_campaign=kumar-gaurav%20nath%20shahdeo-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>

References