Revise function for Restful API