getLogsWithHttpInfo method

Future<Response> getLogsWithHttpInfo({
  1. int? page,
  2. String? logsPerPage,
})

Get logs

Get a page of server logs, selected with page and logs_per_page query parameters. ##### Permissions Must have manage_system permission.

Note: This method returns the HTTP Response.

Parameters:

  • int page: The page to select.

  • String logsPerPage: The number of logs per page. There is a maximum limit of 10000 logs per page.

Implementation

Future<Response> getLogsWithHttpInfo({
  int? page,
  String? logsPerPage,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/logs';

  // 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 (logsPerPage != null) {
    queryParams.addAll(_queryParams('', 'logs_per_page', logsPerPage));
  }

  const contentTypes = <String>[];

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