Code restful API to interface