searchRoles method

Future<RoleSearchResult> searchRoles({
  1. Map<String, dynamic> query = const {},
  2. int? from,
  3. int? size,
})

Searches security roles, optionally returning only those allowing access to the provided controllers.

Implementation

Future<RoleSearchResult> searchRoles(
    {Map<String, dynamic> query = const {}, int? from, int? size}) async {
  final request = KuzzleRequest(
    controller: name,
    action: 'searchRoles',
    body: query,
    from: from,
    size: size,
  );
  final response = await kuzzle.query(request);

  return RoleSearchResult(kuzzle, request: request, response: response);
}