Foreman API throws "unsupported in API v2 for POST and PUT requests" after upgrade from 1.5 to 1.6

Solution In Progress - Updated -

Environment

  • Red Hat OpenStack Platform 5
  • OpenStack Foreman Installer

Issue

After upgrading from foreman-installer-1.5.0-0.6-RC2 to foreman-installer-1.6.0-0.2.RC1, custom scripts which curl directly against the Foreman API no longer work and output the following error.

"error": {"message":"'Content-Type: application/x-www-form-urlencoded' is unsupported in API v2 for POST and PUT requests. Please use 'Content-Type: application/json'."} 

Resolution

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.