using Api along mongoDB