we have Ambari cluster Version 2.5.0.3 , while all clients machines are Linux redhat
first I generated the json file to my Linux machine as the following: ( on ambari server machine )
curl -H "X-Requested-By: ambari" -X GET -u admin:admin http://130.14.6.28:8080/api/v1/clusters/HDP01\?format\=blueprint > blueprint.json
then I update the blueprint.json file with some changes about the parameters and their values
finally my target is to upload the new blueprint.json to ambari cluster in order to take affect !
path=/root
curl -H "X-Requested-By: ambari" --data @ -X POST -u admin:admin http://130.14.6.28:8080/api/v1/blueprints/HDP01 -d @$path/blueprint.json
but I get the following errors ( seems because wrong syntax )
Warning: Couldn't read data from file "", this makes an empty POST. {
"status" : 400, "message" : "Invalid Request: Malformed Request Body. An
exception occurred parsing the request body: Unexpected character ('&'
(code 38)): expected a valid value (number, String, array, object, 'true',
'false' or 'null')\n at [Source: java.io.StringReader@4a3484a6; line: 1,
column: 3]"
please advice what is wrong in my syntax ?
And what is the right syntax in order to upload the new update blueprint.json file
Did you try to validate your JSON online e.g. at https://jsonformatter.curiousconcept.com/ ? Looks like the problem is with general JSON syntax