expose the batchdb api as an http endpoint