Completed the REST api