Added mongodb support for api