I want to create new compute_resources with foreman api in PHP. How can
i do that (Any code example).
Currently i am doing in ajax in this way
var myarray = {compute_resource: { name: 'name', provider: 'provider',
description: 'description'}};
$.ajax({
url : "https://formanurl/api/v2/compute_resources",
data : myarray,
success: function(html){
alert(html);
},
error: function(html){
alert(html);
$("#result").html(html);
}
});
tell me soon