reportsOrgsNewCreateWithHttpInfo method

Future<Response> reportsOrgsNewCreateWithHttpInfo(
  1. String org,
  2. ReportRequest reportRequest
)

Triggers a new report generation. If the report has been previously requested, it returns the status of the report The current duration for generated report {settings.REPORT_EXPIRY_SECONDS/3600} hours. Given a sample result of the api call json [ { \"data\": [ { \"display_name\": \"User Report 1\", \"description\": \"A short Description of Report 1\", \"report_name\": \"report-1\", \"icon\": \"http://some-icon.png\", \"extra_query_params\": [ \"course_id\", \"learner_id\" ], \"status\": {} } ] } ] The body of the request would be json { \"report_name\": \"report-1\", \"owner\": \"owner-name\" \"learner_id\": \"learner-id\", \"course_id\": \"course-id\", }

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> reportsOrgsNewCreateWithHttpInfo(String org, ReportRequest reportRequest,) async {
  // ignore: prefer_const_declarations
  final path = r'/api/reports/orgs/{org}/new'
    .replaceAll('{org}', org);

  // ignore: prefer_final_locals
  Object? postBody = reportRequest;

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

  const contentTypes = <String>['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];


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