added MongoAPI class to api.py