How to query Sat 6.7 API to gather host_collection a host belongs too

Latest response

Hello.

I'm having some issues trying to reference a host host_collections so I can store it for future use. I noticed in the json output the host_collections is not stored in the host configuration in Satellite.

So I need to find a way to figure out how to gather the host host_collections to be stored and used at a later time. I tried to query the host_collections with a search parameter with no luck. The samples in the API guide do not show anything I can reference so I can create the URL for the search.

If someone could possibly provide a sample url of how I can search all the host_colections using either the hostname or the ID that would be great.

I'm going to be using ansible eventually to do this on mass to all my 800+ systems.

Any help would be appreciated.

Thanks

Glen Collins

Responses