createGroupWithHttpInfo method

Future<Response> createGroupWithHttpInfo(
  1. String id,
  2. String name,
  3. String password,
  4. DatabaseInitialisationDto databaseInitialisationDto, {
  5. String? server,
  6. int? q,
  7. int? n,
})

Create a group

Create a new group and associated dbs. The created group will be manageable by the users that belong to the same group as the one that called createGroup. Several tasks can be executed during the group creation like DB replications towards the created DBs, users creation and healthcare parties creation

Note: This method returns the HTTP Response.

Parameters:

  • String id (required): The id of the group, also used for subsequent authentication against the db (can only contain digits, letters, - and _)

  • String name (required): The name of the group

  • String password (required): The password of the group (can only contain digits, letters, - and _)

  • DatabaseInitialisationDto databaseInitialisationDto (required):

  • String server: The server on which the group dbs will be created

  • int q: The number of shards for patient and healthdata dbs : 3-8 is a recommended range of value

  • int n: The number of replications for dbs : 3 is a recommended value

Implementation

Future<Response> createGroupWithHttpInfo(String id, String name, String password, DatabaseInitialisationDto databaseInitialisationDto, { String? server, int? q, int? n, }) async {
  // ignore: prefer_const_declarations
  final path = r'/rest/v1/group/{id}'
      .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody = databaseInitialisationDto;

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

    queryParams.addAll(_queryParams('', 'name', name));
  if (server != null) {
    queryParams.addAll(_queryParams('', 'server', server));
  }
  if (q != null) {
    queryParams.addAll(_queryParams('', 'q', q));
  }
  if (n != null) {
    queryParams.addAll(_queryParams('', 'n', n));
  }

  headerParams[r'password'] = parameterToString(password);

  const authNames = <String>[r'basicSchema'];
  const contentTypes = <String>['application/json'];


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