refine the REST API