Retrieves a list of roles in the cloud by using REST API general QueryHandler;
If filter is provided it will be applied to the corresponding result set.
Format determines the elements representation - references or records.
Default format is references.