Search

4.4. Using Extended Searches

download PDF
You can use the web UI to determine other search terms that you can use to construct your queries. Satellite 6 supports scoped search and tab completion to make this task easier.
For example, to search for hosts by their operating system, navigate to Hosts All Hosts and click inside the Search text box to display a list of search terms. One of the search terms for operating systems is os_description, which you can use in your API query as follows:
$ curl -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts?search=os_description=\"RHEL+Server+6.6\" | python -m json.tool
  {
    ...
    "results": [
        {
            "name": "satellite6.example.com",
            "operatingsystem_id": 1,
            "operatingsystem_name": "RHEL Server 6.6",
            ...
        }
    ],
    "search": "os_description=\"RHEL Server 6.6\"",
}
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.