mDeleteUsers

Deletes multiple users.

Throws a partial error (error code 206) if one or more user deletions fail.


Copied to clipboard!
mDeleteUsers(kuids, [options]);

Property Type Description
kuids
array<string>
Array of user kuid
options
object
Query options

options

Property Type
(default)
Description
queuable
boolean

(true)
If true, queues the request during downtime, until connected to Kuzzle again
refresh
boolean

(false)
If set to wait_for, Kuzzle will not respond until the users deletion is indexed

Resolves

An array of the deleted user ids.

Usage

Copied to clipboard!
try {
  const response = await kuzzle.security.mDeleteUsers([
    'user1',
    'user2',
    'user3'
  ]);

  console.log(response);
  /*
  [ 'user1', 'user2', 'user3' ]
    */
} catch (e) {
  console.error(e);
}