getAllTeamsWithHttpInfo method

Future<Response> getAllTeamsWithHttpInfo({
  1. int? page,
  2. int? perPage,
  3. bool? includeTotalCount,
  4. bool? excludePolicyConstrained,
})

Get teams

For regular users only returns open teams. Users with the "manage_system" permission will return teams regardless of type. The result is based on query string parameters - page and per_page. ##### Permissions Must be authenticated. "manage_system" permission is required to show all teams.

Note: This method returns the HTTP Response.

Parameters:

  • int page: The page to select.

  • int perPage: The number of teams per page.

  • bool includeTotalCount:

  • bool excludePolicyConstrained: If set to true, teams which are part of a data retention policy will be excluded. The sysconsole_read_compliance permission is required to use this parameter. Minimum server version: 5.35

Implementation

Future<Response> getAllTeamsWithHttpInfo({
  int? page,
  int? perPage,
  bool? includeTotalCount,
  bool? excludePolicyConstrained,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/teams';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (perPage != null) {
    queryParams.addAll(_queryParams('', 'per_page', perPage));
  }
  if (includeTotalCount != null) {
    queryParams.addAll(_queryParams('', 'include_total_count', includeTotalCount));
  }
  if (excludePolicyConstrained != null) {
    queryParams.addAll(_queryParams('', 'exclude_policy_constrained', excludePolicyConstrained));
  }

  const contentTypes = <String>[];

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