Satellite 6 API adding multiple hosts to multiple host collections
Issue
You are getting the following error from your curl string when trying to use the bulk add host collections feature of the satellite 6 API:
{"displayMessage":"No hosts have been specified.","errors":["No hosts have been specified."]}
Example curl string and error:
curl -k -s\
-H 'Authorization: Basic EcryptedString' \
-H "Content-Type:application/json" \
-H "Accept-Type:application/json" \
-X PUT https://myfqhostname/api/hosts/bulk/add_host_collections \
-d '{"included[ids]":["21","330"],"host_collection_ids":["12","11"]}'
{"displayMessage":"No hosts have been specified.","errors":["No hosts have been specified."]}
Environment
Satellite 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.