getTeamPoliciesForUserWithHttpInfo method

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

Get the policies which are applied to a user's teams

Gets the policies which are applied to the all of the teams to which a user belongs. Minimum server version: 5.35 ##### Permissions Must be logged in as the user or have the manage_system permission. ##### License Requires an E20 license.

Note: This method returns the HTTP Response.

Parameters:

  • String userId (required): The ID of the user. This can also be "me" which will point to the current user.

  • int page: The page to select.

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

Implementation

Future<Response> getTeamPoliciesForUserWithHttpInfo(
  String userId, {
  int? page,
  int? perPage,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/data_retention/team_policies'.replaceAll('{user_id}', userId);

  // 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));
  }

  const contentTypes = <String>[];

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