messages: refactoring and REST API

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
messages: refactoring and REST API

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
messages: refactoring and REST API

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>