Hide Forgot
Description of problem: Making the rest call to https://satellite.example.com/api/v2/hostgroups?title="test/EA/ENG" returns 3 hostgroups, not just the one with the title "test/EA/ENG". The data returned is: { "total": 3, "subtotal": 3, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": [ { "subnet_id": null, "subnet_name": null, "operatingsystem_id": null, "operatingsystem_name": null, "domain_id": null, "domain_name": null, "environment_id": null, "environment_name": null, "compute_profile_id": null, "compute_profile_name": null, "ancestry": null, "parent_id": null, "parent_name": null, "puppet_proxy_id": null, "puppet_ca_proxy_id": null, "ptable_id": null, "ptable_name": null, "medium_id": null, "medium_name": null, "architecture_id": null, "architecture_name": null, "realm_id": null, "realm_name": null, "created_at": "2016-08-31 13:52:48 UTC", "updated_at": "2016-08-31 13:52:48 UTC", "id": 1, "name": "test", "title": "test" }, { "subnet_id": null, "subnet_name": null, "operatingsystem_id": null, "operatingsystem_name": null, "domain_id": null, "domain_name": null, "environment_id": null, "environment_name": null, "compute_profile_id": null, "compute_profile_name": null, "ancestry": "1", "parent_id": 1, "parent_name": "HG_CSL3.1.1", "puppet_proxy_id": null, "puppet_ca_proxy_id": null, "ptable_id": null, "ptable_name": null, "medium_id": null, "medium_name": null, "architecture_id": null, "architecture_name": null, "realm_id": null, "realm_name": null, "created_at": "2016-08-31 13:53:06 UTC", "updated_at": "2016-08-31 13:53:06 UTC", "id": 2, "name": "EA", "title": "HG_CSL3.1.1/EA" }, { "subnet_id": null, "subnet_name": null, "operatingsystem_id": null, "operatingsystem_name": null, "domain_id": null, "domain_name": null, "environment_id": null, "environment_name": null, "compute_profile_id": null, "compute_profile_name": null, "ancestry": "1/2", "parent_id": 2, "parent_name": "HG_CSL3.1.1/EA", "puppet_proxy_id": null, "puppet_ca_proxy_id": null, "ptable_id": null, "ptable_name": null, "medium_id": null, "medium_name": null, "architecture_id": null, "architecture_name": null, "realm_id": null, "realm_name": null, "created_at": "2016-08-31 13:53:18 UTC", "updated_at": "2016-08-31 13:53:18 UTC", "id": 3, "name": "ENG", "title": "HG_CSL3.1.1/EA/ENG" } ] Version-Release number of selected component (if applicable): 6.2.1 GA How reproducible: Very Steps to Reproduce: 1. Make the above listed API call and view the returned data 2. 3. Actual results: Expected results: https://satellite.example.com/api/v2/hostgroups?search=title="test/EA/ENG" which returns: { "total": 3, "subtotal": 1, "page": 1, "per_page": 20, "search": "\"test/EA/ENG\"", "sort": { "by": null, "order": null }, "results": [ { "subnet_id": null, "subnet_name": null, "operatingsystem_id": null, "operatingsystem_name": null, "domain_id": null, "domain_name": null, "environment_id": null, "environment_name": null, "compute_profile_id": null, "compute_profile_name": null, "ancestry": "1/2", "parent_id": 2, "parent_name": "test/EA", "puppet_proxy_id": null, "puppet_ca_proxy_id": null, "ptable_id": null, "ptable_name": null, "medium_id": null, "medium_name": null, "architecture_id": null, "architecture_name": null, "realm_id": null, "realm_name": null, "created_at": "2016-08-31 13:53:18 UTC", "updated_at": "2016-08-31 13:53:18 UTC", "id": 3, "name": "ENG", "title": "test/EA/ENG" } ] } Additional info:
As an alternative, does search by title work in the UI?
(In reply to Brad Buckingham from comment #1) > As an alternative, does search by title work in the UI? Customer is not interested in using the UI. I haven't tested the results out in the UI.
Josh, I beleive you are not using the API correctly, the correct way to search a hostgroup based on its name or title is: https://satellite.example.com/api/v2/hostgroups?search=title=test/EA/ENG I'm not sure why you think title is a valid query parameter? Please re-open in case I've missed something - thanks!