SDK
SDK Javascript v6.x
1

# deleteProfile

Deletes a security profile.


Copied to clipboard!
deleteProfile(id, [options]);

Property Type Description
id
string
Profile identifier
options
object
Query options

# options

Additional query 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 profile deletion is indexed

# Resolves

An acknowledgment message.

# Usage

Copied to clipboard!
try {
  const response = await kuzzle.security.deleteProfile('myProfile');
  console.log(response);
  /*
  { found: true,
    _index: '%kuzzle',
    _type: 'profiles',
    _id: 'myProfile',
    _version: 29,
    result: 'deleted',
    _shards: { total: 2, successful: 1, failed: 0 } }
   */
  console.log('Profile successfully deleted');
} catch (e) {
  console.error(e);
}