Using options instead of criteria and size in rest services
getViewPageInBatch