i use chef-api for express js and i wanna get only the ip address of node " server 1 " from a chef-server
im sending a request like this
Code :
chef.partialSearch("node", "name:server1",{"ip":"ipaddress"} ,function(err, res){ if (err){console.log(error);} else{console.log(res);} });
Or
chef.partialSearch("node", { q: "name:server1"} ,{"ip":"ipaddress"} ,function(err, res){ .... });
=> Response :
received status code 400 invalid value 'ipaddress' for no_key
function in code source :
partialSearch: function(index, qs, data, fn){ http_methods.post([config.host_url, "search", index].join("/"), qs, data, function(err, response){ return fn(err, response); }); }
and i cant understand the correct syntax for the request (http) from the official website doc api_chef_server
Can you please give a valid syntax with example .
Thanks