added suport for rest api