rest api defined