importUsers method

Future<ClientResponse<void, Errors>> importUsers(
  1. ImportRequest request
)

Bulk imports users. This request performs minimal validation and runs batch inserts of users with the expectation that each user does not yet exist and each registration corresponds to an existing FusionAuth Application. This is done to increases the insert performance.

Therefore, if you encounter an error due to a database key violation, the response will likely offer a generic explanation. If you encounter an error, you may optionally enable additional validation to receive a JSON response body with specific validation errors. This will slow the request down but will allow you to identify the cause of the failure. See the validateDbConstraints request parameter.

@param {ImportRequest} request The request that contains all the information about all the users to import. @returns {Promise<ClientResponse

Implementation

Future<ClientResponse<void, Errors>> importUsers(ImportRequest request) {
  return _start<void, Errors>()
      .withUri('/api/user/import')
      .withJSONBody(request)
      .withMethod('POST')
      .go();
}