SDK
SDK Javascript v6.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

mDeleteProfiles #

Deletes multiple security profiles.

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


mDeleteProfiles(ids, [options]);

PropertyTypeDescription
ids
array<string>
Profile identifiers
options
object
Query options

options #

PropertyType
(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 profiles deletion is indexed

Resolves #

An array of the deleted profile ids.

Usage #

try {
  const response = await kuzzle.security.mDeleteProfiles([
    'profile1',
    'profile2',
    'profile3',
    'profile4',
    'profile5'
  ]);
  console.log(response);
  /*
  [ 'profile1', 'profile2', 'profile3', 'profile4', 'profile5' ]
    */
} catch (e) {
  console.error(e);
}