Rest API inteface.