Bug #7332
closedHost Create API documentation missing required parameters
Description
Steps to Reproduce:
1. Navigate to host API doc of sat6 installation -> Host Create - https://$host/apidoc/v2/hosts/create.html
2. Notice that "name" is the only required parameter
3.. Try one of these curl commands to create the host
#curl -X POST -H "Accept:application/json" -H "Content-Type: application/json" -u admin:changeme --insecure -d '{"host":{"name":"testhost1"}}' https://cloud-qe-14.idm.lab.bos.redhat.com/api/v2/hosts
- curl -X POST -H "Accept:application/json" -H "Content-Type: application/json" -u admin:changeme --insecure -d '{"name":"testhost1"}' https://cloud-qe-14.idm.lab.bos.redhat.com/api/v2/hosts
Actual results:
{
"error": {"id":null,"errors":{"environment_id":["can't be blank"],"mac":["is invalid","can't be blank"],"architecture_id":["can't be blank"],"operatingsystem_id":["can't be blank"],"domain_id":["can't be blank"],"root_pass":["should be 8 characters or more","should not be blank - consider setting a global or host group default"],"ptable_id":["cant be blank unless a custom partition has been defined"]},"full_messages":["Environment can't be blank","MAC address is invalid","MAC address can't be blank","Architecture can't be blank","Operatingsystem can't be blank","Domain can't be blank","Root password should be 8 characters or more","Root password should not be blank - consider setting a global or host group default","Partition Table cant be blank unless a custom partition has been defined"]}
}
Expected results:
API doc should have updated list of required parameters