Skip to main content

Delete Role

Delete or restore a role definition in RSA Governance & Lifecycle.

POST https://instance.securid.com/aveksa/command.submit?cmd=deleteRole

Purpose​

The deleteRole command deletes the role associated with the specified Role ID. It also supports restoring a previously deleted role by using the undoDelete query parameter.

Parameters are passed as URL query parameters using an HTTP POST request, not in the request body.

Request​

Parameters (URL Query)​

ParameterTypeRequirementDescription
cmdstringCommand name: deleteRole.
roleIdintegerThe ID of the role to delete or restore.
undoDeletestringOptionalControls deletion behavior:

false: (Default) Deletes the role.

true: Restores (undoes deletion of) the role.

Value is case-insensitive.
formatstringOptionalThe response format:

properties: (Default) Key-value format (key=value). If multiple objects return, values are comma-separated.

json: JavaScript Object Notation format. Suitable for programmatic parsing.
tokenstringDeprecatedSession token retrieved from loginUser. Deprecated. Use the Authorization request header instead.

Request Headers​

HeaderTypeRequirementDescription
AuthorizationstringBearer token for a user with system administrator privileges, obtained via loginUser. Format: Bearer <token>.
AcceptstringOptionalDesired response MIME type (for example, application/json or text/plain).
Content-TypestringOptionalContent type header: application/x-www-form-urlencoded or application/json.
note

The Authorization request header replaces the deprecated token URL query parameter.

Token Type Requirement

Role management commands currently require an authenticated user session token obtained via loginUser with the Role Administrator capability. While the Web Services Administration console allows mapping Role commands to a Trusted Application, requests using a Trusted Application token (loginTrustedApp) currently return HTTP 403 (Couldn't perform delete action on role).

Response​

Parameters​

ParameterTypeDescription
statusstringExecution result: success or failure.
messagestringOptional diagnostic or informational details returned by the server.

Examples​

Request​

# Delete a role
curl -X POST \
"https://instance.securid.com/aveksa/command.submit?cmd=deleteRole&roleId=3&format=json" \
-H "Authorization: Bearer <user-token>" \
-H "Accept: application/json"

# Restore (undo delete) a role
curl -X POST \
"https://instance.securid.com/aveksa/command.submit?cmd=deleteRole&roleId=3&undoDelete=true&format=json" \
-H "Authorization: Bearer <user-token>" \
-H "Accept: application/json"

Response​

JSON Format (format=json):

{
"status": "success",
"message": "Role 3 deleted successfully."
}

Properties Format (format=properties):

status=success
message=Role 3 deleted successfully.

Verified with RSA Governance & Lifecycle version 8.0.0.

References​