3.5. openidm.delete(id, rev)

This function deletes a resource object.

Parameters

id

string

The identifier of the object to be deleted.

rev

string

The revision of the object to be deleted, or null if the object is not subject to revision control.

Returns

  • A null value if successful.

Throws

  • An exception is thrown if the object could not be deleted.

Note that delete is a reserved word in JavaScript and this function can therefore not be called in the usual manner. To call delete from a JavaScript, you must specify the call as shown in the following example:

openidm['delete']('managed/user/'+ user._id, user._rev)
            

Calling openidm.delete() directly from a JavaScript results in an error similar to the following:

                org.forgerock.openidm.script.ScriptException: missing name after . operator