simple rest api implementation