implements flask_restful version of api