restapi: if filter: header is set, use query instead of search (#882946)

When the filter option is specified the api query should not
throw a insufficient permissions exception. Instead the query should
return a list of objects that the user has permissions for.

Change-Id: I00eeb96515cb50431f73f8fc66d2730b143f14af
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=882946
Signed-off-by: Ravi Nori <rnori@redhat.com>