Bug #24756
closedUnable to query audits by template type: ScopedSearch::QueryNotSupported
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1619589
Description of problem:
The following used to work in 6.3 but no longer works in 6.4.0 snap 18:
Making HTTP GET request to https://.../api/v2/audits with options {'data': '{"search": "type=template"}', 'auth': ('admin', 'changeme'), 'verify': False, 'headers': {'content-type': 'application/json'}}, no params and no data.
It returns:
Received HTTP 400 response: {
"error": {"message":"'auditable_type' should be one of 'role, ptable, provisioning_template, filter, katello/repository, hostgroup, smart_proxy, katello/host/content_facet, katello/host/subscription_facet, remote_execution_feature, lookup_value, model, domain, realm, environment, architecture, image, usergroup, hostgroup_class, puppetclass, medium, katello/content_view, katello/kt_environment, job_template, bookmark, katello/activation_key, katello/host_collection, katello/sync_plan, katello/capsule_lifecycle_environment, katello/content_view_component, katello/content_view_environment, katello/content_view_puppet_module, katello/content_view_version, katello/gpg_key, katello/product, foreman_virt_who_configure/config, job_invocation, ansible_role, foreman_openscap/policy, foreman_openscap/scap_content, foreman_openscap/tailoring_file, discovery_rule, compute_profile, config_group, config_group_class, ssh_key, compute_attribute, host_class, host_config_group, http_proxy, key_pair, personal_access_token, auth_source, compute_resource, host, interface, location, organization, os, override_value, parameter, partition_table, setting, smart_class_parameter, smart_variable, subnet', but the query was 'template'","class":"ScopedSearch::QueryNotSupported"}
}
How reproducible:
always
Steps to Reproduce:
1. Do API search request to /api/v2/audits with {"search": "type=template"}
Actual results:
HTTP 400 response
Expected results:
Should work
Updated by Tomer Brisker over 5 years ago
- Subject changed from Unable to query audits by template and user type: ScopedSearch::QueryNotSupported to Unable to query audits by template type: ScopedSearch::QueryNotSupported
- Status changed from New to Rejected
`template` is ambiguous term as there are multiple types of templates that can be searched by. rejecting.