Also reproducible via
$ curl -X GET -s -k -u admin:changeme 'https://localhost/katello/api/v2/module_streams?host_ids[]=3&name_stream_only=1&search=foo' --globoff
{"total":4,"subtotal":null,"page":null,"per_page":null,"error":"Your search query was invalid. Please revise it and try again. The full error has been sent to the application logs.","search":"foo","sort":{"by":null,"order":null},"results":[]}
its the name_stream_only causing the error. Going by the ugly sql error.
2018-10-03T14:37:40 [E|app|51e34] Invalid search: PG::GroupingError: ERROR: column "katello_module_streams.id" must appear in the GROUP BY clause or be used in an aggregate function
| LINE 1: ...reams"."name", "katello_module_streams"."stream", "katello_m...
| ^
| : SELECT "katello_module_streams"."name", "katello_module_streams"."stream", "katello_module_streams"."id" AS t0_r0, "katello_module_streams"."name" AS t0_r1, "katello_module_streams"."uuid" AS t0_r2, "katello_module_streams"."version" AS t0_r3, "katello_module_streams"."context" AS t0_r4, "katello_module_streams"."stream" AS t0_r5, "katello_module_streams"."arch" AS t0_r6, "katello_module_streams"."created_at" AS t0_r7, "katello_module_streams"."updated_at" AS t0_r8, "katello_module_streams"."description" AS t0_r9, "katello_module_streams"."summary" AS t0_r10, "katello_repositories"."id" AS t1_r0, "katello_repositories"."name" AS t1_r1, "katello_repositories"."pulp_id" AS t1_r2, "katello_repositories"."created_at" AS t1_r3, "katello_repositories"."updated_at" AS t1_r4, "katello_repositories"."major" AS t1_r5, "katello_repositories"."minor" AS t1_r6, "katello_repositories"."gpg_key_id" AS t1_r7, "katello_repositories"."library_instance_id" AS t1_r8, "katello_repositories"."content_id" AS t1_r9, "katello_repositories"."arch" AS t1_r10, "katello_repositories"."label" AS t1_r11, "katello_repositories"."content_view_version_id" AS t1_r12, "katello_repositories"."relative_path" AS t1_r13, "katello_repositories"."url" AS t1_r14, "katello_repositories"."unprotected" AS t1_r15, "katello_repositories"."content_type" AS t1_r16, "katello_repositories"."product_id" AS t1_r17, "katello_repositories"."environment_id" AS t1_r18, "katello_repositories"."checksum_type" AS t1_r19, "katello_repositories"."docker_upstream_name" AS t1_r20, "katello_repositories"."distribution_version" AS t1_r21, "katello_repositories"."distribution_arch" AS t1_r22, "katello_repositories"."distribution_bootable" AS t1_r23, "katello_repositories"."distribution_family" AS t1_r24, "katello_repositories"."distribution_variant" AS t1_r25, "katello_repositories"."distribution_uuid" AS t1_r26, "katello_repositories"."mirror_on_sync" AS t1_r27, "katello_repositories"."download_policy" AS t1_r28, "katello_repositories"."verify_ssl_on_sync" AS t1_r29, "katello_repositories"."upstream_username" AS t1_r30, "katello_repositories"."upstream_password" AS t1_r31, "katello_repositories"."ostree_upstream_sync_policy" AS t1_r32, "katello_repositories"."ostree_upstream_sync_depth" AS t1_r33, "katello_repositories"."container_repository_name" AS t1_r34, "katello_repositories"."deb_releases" AS t1_r35, "katello_repositories"."deb_components" AS t1_r36, "katello_repositories"."deb_architectures" AS t1_r37, "katello_repositories"."ssl_ca_cert_id" AS t1_r38, "katello_repositories"."ssl_client_cert_id" AS t1_r39, "katello_repositories"."ssl_client_key_id" AS t1_r40, "katello_repositories"."ignore_global_proxy" AS t1_r41, "katello_repositories"."ignorable_content" AS t1_r42, "katello_repositories"."description" AS t1_r43, "katello_repositories"."docker_tags_whitelist" AS t1_r44, "katello_repositories"."source_repo_checksum_type" AS t1_r45 FROM "katello_module_streams" LEFT OUTER JOIN "katello_repository_module_streams" ON "katello_repository_module_streams"."module_stream_id" = "katello_module_streams"."id" LEFT OUTER JOIN "katello_repositories" ON "katello_repositories"."id" = "katello_repository_module_streams"."repository_id" WHERE (("katello_module_streams"."name" ILIKE '%module_spec%' OR "katello_module_streams"."uuid" ILIKE '%module_spec%' OR "katello_module_streams"."stream" ILIKE '%module_spec%' OR "katello_module_streams"."version" ILIKE '%module_spec%' OR "katello_module_streams"."context" ILIKE '%module_spec%' OR "katello_module_streams"."arch" ILIKE '%module_spec%' OR "katello_repositories"."name" ILIKE '%module_spec%')) AND "katello_module_streams"."id" IN ($1, $2, $3, $4, $5, $6, $7) GROUP BY "katello_module_streams"."name", "katello_module_streams"."stream"