POST requests against Red Hat Satellite do not get accepted

Solution Unverified - Updated -

Issue

  • The response of POST requests against the Satellite API is HTTP/1.1 406 Not Acceptable

    $ sudo curl -v --header "Accept:application/json,version=2" --header "Content-Type:application/json" --request POST --user user:password --insecure https://satellite.example.com/api/hosts/136/play_roles 
    *   Trying 10.xx.xx.xx...
    [...Output omitted...]
    * Server auth using Basic with user 'user'
    > POST /api/hosts/136/play_roles HTTP/1.1
    > Host: satellite.example.com
    > Authorization: Basic XXXXXXXXXX==
    > User-Agent: curl/7.61.1
    > Accept:application/json,version=2
    > Content-Type:application/json
    > 
    < HTTP/1.1 406 Not Acceptable
    < Date: Mon, 15 Mar 2021 09:05:03 GMT
    < Server: Apache
    < X-Request-Id: 9a8d10a5-a4f0-4b85-94c9-d19ab2fcd419
    < X-Runtime: 0.021994
    < Strict-Transport-Security: max-age=631139040; includeSubdomains
    < X-Frame-Options: sameorigin
    < X-Content-Type-Options: nosniff
    < X-XSS-Protection: 1; mode=block
    < X-Download-Options: noopen
    < X-Permitted-Cross-Domain-Policies: none
    < Content-Security-Policy: default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data:; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'
    < X-Powered-By: Phusion Passenger 4.0.18
    < Content-Length: 0
    < Status: 406 Not Acceptable
    < Content-Type: text/html; charset=utf-8
    <
    * Connection #0 to host satellite.example.com left intact
    

Environment

  • Red Hat Satellite 6.8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content