finish simple rest api