Deleting users

You can delete an individual user or remove an LDAP group from the list of users.

If you delete an LDAP server, the LDAP group will be automatically removed from the list of users. For details, see Unregistering an LDAP server.

Method and URI

To delete a user with a {userId}, the request’s method and URI are similar to the following example:

DELETE  https://{hostname|IPv4}/api/security/user/{userId}

Tip

To get a {userId} value based on the user name, follow the instructions in Getting a {userId}.

Parameters

None.

Data

None.

Example

Assume that you want to delete user Sarah ({userId} 1005). Run the following command:

user_id = "1005"

requests.delete('https://' + spp_ipv4 + '/api/security/user/' + user_id,
    headers={...}, params="", data="", verify=...)
_images/reference_user_delete01.png

Figure 88 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigation pane, click Accounts > User, select a user to delete from the list, and click the ellipsis (···) > Delete users.

After you run the Python snippet, ensure that you get a response with the HTTP status of 204 (No Content) and that you no longer see the user Sarah.

To delete an LDAP group, send a similar request with the {userId} of the LDAP group.