Forum Discussion

gondeeri's avatar
gondeeri
Icon for Nimbostratus rankNimbostratus
Aug 17, 2018

Modifying parameters in iApp via REST API

Hello,

 

I want to modify one parameter in own iApp via REST API... I tried via PUT and also PATCH... here examp.

 

I want to change "value":"none" to "value":"tech"

 

curl -sk -u admin:pwd -H "Content-Type: application/json" -X PATCH -d '"variables":[{"name":"maintenance__MAINTENANCE","encrypted":"no","value":"tech"}]'

 

I get this error {"code":400,"message":"Found invalid JSON body in the request.","errorStack":[],"apiError":1}[

 

and same error is also with PUT

 

version is 12.1.3.2

 

Pls any idea why is not working?

 

thx

 

Erik

 

1 Reply

  • Your JSON body has a syntax error, make sure you enclose the whole statement in braces. Please note I've not been able to verify the API call is correct, but try amend the JSON body like below and let me know how you get on.

    {"variables":[{"name":"maintenance__MAINTENANCE","encrypted":"no","value":"tech"}]}

    If you're not using an IDE, this website is good for validating JSON https://jsonlint.com