Project

General

Profile

Actions

Bug #7332

closed

Host Create API documentation missing required parameters

Added by Joseph Magen over 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

  1. 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


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #6997: Host API v2 required parameters are wrongDuplicate08/07/2014Actions
Actions #1

Updated by The Foreman Bot over 9 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1732 added
  • Pull request deleted ()
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Related to Bug #6997: Host API v2 required parameters are wrong added
Actions #3

Updated by Dominic Cleal over 9 years ago

  • Bugzilla link set to 1135651
Actions #4

Updated by Anonymous over 9 years ago

  • Target version changed from 1.7.4 to 1.7.3
Actions #5

Updated by Dominic Cleal over 9 years ago

  • Target version changed from 1.7.3 to 1.7.2
Actions #6

Updated by Joseph Magen over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #7

Updated by Dominic Cleal over 9 years ago

  • translation missing: en.field_release set to 21
Actions

Also available in: Atom PDF