Generic rest api for interacting with mongodb collections.