getComplianceReportsWithHttpInfo method

Future<Response> getComplianceReportsWithHttpInfo({
  1. int? page,
  2. int? perPage,
})

Get reports

Get a list of compliance reports previously created by page, selected with page and per_page query parameters. ##### Permissions Must have manage_system permission.

Note: This method returns the HTTP Response.

Parameters:

  • int page: The page to select.

  • int perPage: The number of reports per page.

Implementation

Future<Response> getComplianceReportsWithHttpInfo({
  int? page,
  int? perPage,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/compliance/reports';

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