[ https://issues.apache.org/jira/browse/AMBARI-3079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Onischuk updated AMBARI-3079: ------------------------------------ Attachment: AMBARI-3079.patch > Ambari-Client Create Hosts request doesn't follows api request format > --------------------------------------------------------------------- > > Key: AMBARI-3079 > URL: https://issues.apache.org/jira/browse/AMBARI-3079 > Project: Ambari > Issue Type: Task > Reporter: Andrew Onischuk > Assignee: Andrew Onischuk > Attachments: AMBARI-3079.patch > > > Here is the request which ambari-client sends now to add a host: > {code} > curl -i -X POST -d '{"items": [{"ip": "192.168.56.106", "host_name": "dev06.hortonworks.com", "rack_info": null}]}' -u admin:admin http://dev05.hortonworks.com:8080/api/v1/hosts > {code} > It does not get parsed successfuly by our api > Here what we should send, and what successfully adds hosts: > {code} > curl -i -X POST -d '[{"Hosts":{"ip": "192.168.56.106","host_name":"dev05.hortonworks.com","rack_info":"/default-rack"}},{"Hosts":{"host_name":"one_more_host"}}}]' -u admin:admin http://dev05.hortonworks.com:8080/api/v1/hosts > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira