getLdapGroupsWithHttpInfo method

Future<Response> getLdapGroupsWithHttpInfo({
  1. String? q,
  2. int? page,
  3. int? perPage,
})

Returns a list of LDAP groups

Permissions Must have manage_system permission. Minimum server version: 5.11

Note: This method returns the HTTP Response.

Parameters:

  • String q: Search term

  • int page: The page to select.

  • int perPage: The number of users per page. There is a maximum limit of 200 users per page.

Implementation

Future<Response> getLdapGroupsWithHttpInfo({
  String? q,
  int? page,
  int? perPage,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/ldap/groups';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (q != null) {
    queryParams.addAll(_queryParams('', 'q', q));
  }
  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (perPage != null) {
    queryParams.addAll(_queryParams('', 'per_page', perPage));
  }

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}