define schema and RESTful api