Deleting a role

You can delete a custom role.

Method and URI

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

DELETE  https://{hostname|IPv4}/api/security/role/{roleId}

Tip

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

Parameters

None.

Data

None.

Example: Delete a custom role

Assume that you have a role, Visitor ({roleId} 1002), and you want to delete it.

A Python snippet that is similar to the following example can be used to delete this role:

role_id = "1002"

requests.delete('https://' + spp_ipv4 + '/api/security/role/' + role_id,
    headers={...}, params="", data="", verify=...)

You will get a response with the HTTP status of 204 (No Content). Ensure you can no longer see the user Visitor.