Rest api refactor - STRATOS-991

Updated the CLI with the refactored changes
For ticket https://issues.apache.org/jira/browse/STRATOS-991