Creating a host using REST API on Red Hat Satellite 6 fails with error Medium cannot be blank.

Solution Verified - Updated -

Issue

  • Creating a host using REST API fails with error Medium can't be blank.
# curl -H "Accept:application/json,version=2" -H "Content-Type:application/json" -X POST -u admin:redhat -k -d "{\"name\":\"testhost\",\"domain_name\":\"lab.example.com\",\"operatingsystem_name\":\"RHEL Server 7.5\",\"organization_id\":\"1\",\"mac\":\"52-54-00-57-83-33\",\"build\":true,\"ip\":\"192.168.X.X\",\"architecture_name\":\"x86_64\",\"ptable_name\":\"Kickstart default\",\"root_pass\":\"changeme\",\"location_id\":\"2\"}" https://satellite.lab.example.com/api/v2/hosts

{
  "error": {"id":null,"errors":{"medium_id":["can't be blank"]},"full_messages":["Medium can't be blank"]}
}

Environment

  • Red Hat Satellite 6.3.1.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In