SDK
SDK Javascript v5.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.

deleteProfile #

Delete the provided profile.

There is a small delay between the time a profile is deleted and it being reflected in the search layer (usually a couple of seconds). That means that a profile that was just deleted may still be returned by the searchProfiles function at first.

deleteProfile(id, [options], [callback]) #

ArgumentsTypeDescription
idstringUnique profile identifier to delete
optionsJSON ObjectOptional parameters
callbackfunction(Optional) Callback handling the response

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue
refreshstringIf set to wait_for, Kuzzle will wait the persistence layer to finish indexing (available with Elasticsearch 5.x and above)undefined

Return Value #

Returns the Security object to allow chaining.


Callback Response #

Returns the ID of the security profile that has been deleted.

Usage #

// Using callbacks (NodeJS or Web Browser)
kuzzle
  .security
  .deleteProfile('myprofile', function(error, result) {
  });
// Using promises (NodeJS)
kuzzle
  .security
  .deleteProfilePromise('myprofile')
  .then((result) => {
  });

Callback response

"deleted profile identifier"