rest interface with spark to mongodb