basic rest api with mongo