Refactoring the REST API

For STRATOS-857