Use Stats batch REST API calls

Fix #1177