Added REST API. (#7)