Feature/rest api improvements