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

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: I0e459fc315753e88e8a1f232a206303568b44492
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=869334
Signed-off-by: Ravi Nori <rnori@redhat.com>