getTeamsForRetentionPolicyWithHttpInfo method

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

Get the teams for a granular data retention policy

Gets the teams to which a granular data retention policy is applied. Minimum server version: 5.35 ##### Permissions Must have the sysconsole_read_compliance_data_retention permission. ##### License Requires an E20 license.

Note: This method returns the HTTP Response.

Parameters:

  • String policyId (required): The ID of the granular retention policy.

  • int page: The page to select.

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

Implementation

Future<Response> getTeamsForRetentionPolicyWithHttpInfo(
  String policyId, {
  int? page,
  int? perPage,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/data_retention/policies/{policy_id}/teams'.replaceAll('{policy_id}', policyId);

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