simplifying rest api