Added rest api for range query , needs testing