API - fixed results array enumeration and added allresults field to response