I am using belwo paramter code for Discovered host provision in organization which working fine.
curl -X PUT -H ‘Accept: application/json’ -H ‘Content-Type: application/json’ -u admin:admin -L -k -i https://foremansrv.examlab.com/api/v2/discovered_hosts/101/ -d ‘{“discovered_host”:{“environment_id”:“1”,“domain_id”:1,“ptable_id”:104,“medium_id”:10,“architecture_id”:1,“operatingsystem_id”:“1”,“root_pass”:“rootpass”, “pxe_loader”:“PXELinux BIOS”,“build”:“true”,“organization_id”:“28”,“location_id”:“4”}}’
but when i am creating new organization with below code then host is not getting provisioned
is there any other parameters required other than mentioned above? here are the code to create organization,
Go to https://YOURFOREMANURL/api/v2/discovered_hosts/ to see if you get a response.
If you get the error there, make sure the plugin is installed and enabled.
Restart the http service if you used a package manager.
If it’s still in error try adding a host group and add a host to it. I did both and either made it work for me. If the latter fixes your issue, consider filing a bug, because I think even without hosts the API should return something.