Skip to main content

Create Role

Create a new role definition in RSA Governance & Lifecycle.

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

Purpose​

The createRole command creates a new role definition in the system. The newly created role is placed in a draft (New) state and requires the commitRole command to transition into a committed state.

This command parses the role attributes from a JSON payload in the request body, while endpoint routing parameters are passed as URL query parameters. Only authorized users with role creation privileges can execute this command.

Request​

Parameters (URL Query)​

ParameterTypeRequirementDescription
cmdstringCommand name: createRole.
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>.
Content-TypestringMust be application/json.
AcceptstringOptionalDesired response MIME type (for example, application/json or text/plain).
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 (Not authorized to create role).

Request Body (JSON)​

The request body must contain a JSON object defining the role attributes.

FieldTypeRequirementDescription
roleNamestringDisplay name of the role. Maximum 256 characters.
roleRawNamestringUnique identifier name of the role. Maximum 256 characters.
roleSetIdintegerID of the role set to which this role belongs. Must be an existing role set ID.
availableForRequestintegerIndicates whether the role is available for user requests: 1 (yes) or 0 (no).
roleTypestringOptionalRole type code. Acceptable values: "GR" (Global Role), "TR" (Technical Role), or "BR" (Business Role). Defaults to "BR" if null or omitted.
longDescriptionstringOptionalDetailed description of the role. Maximum 4000 characters.
shortDescriptionstringOptionalShort summary describing the role. Maximum 256 characters.
helpLinkstringOptionalURL pointing to help documentation for the role (e.g., https://help.example.com/role). Maximum 256 characters.
ownerintegerOptionalUser ID of the primary owner. If omitted, no owner is assigned.
backupOwnerintegerOptionalUser ID of the backup owner. If omitted, no backup owner is assigned.
disabledbooleanOptionalWhether the role is disabled: true (disabled) or false (enabled, default).

Request Payload Example​

{
"roleName": "Financial Auditor",
"roleRawName": "ROLE_FIN_AUDITOR",
"longDescription": "Grants read access to general ledger and compliance audit records.",
"shortDescription": "Financial auditing business role",
"helpLink": "https://help.example.com/roles/auditor",
"availableForRequest": 1,
"owner": 1001,
"backupOwner": 1002,
"disabled": false,
"roleSetId": 101,
"roleType": "BR"
}

Response​

Parameters​

ParameterTypeDescription
roleVersionIdintegerVersion ID of the newly created role in pending state. Required when calling commitRole.
statusstringExecution result: success or failure.
messagestringOptional diagnostic or informational details regarding the operation.

Examples​

Request​

curl -X POST \
"https://instance.securid.com/aveksa/command.submit?cmd=createRole&format=json" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"roleName": "Financial Auditor",
"roleRawName": "ROLE_FIN_AUDITOR",
"longDescription": "Grants read access to general ledger and compliance audit records.",
"shortDescription": "Financial auditing business role",
"helpLink": "https://help.example.com/roles/auditor",
"availableForRequest": 1,
"owner": 1001,
"backupOwner": 1002,
"disabled": false,
"roleSetId": 101,
"roleType": "BR"
}'

Response​

JSON Format (format=json):

{
"status": "success",
"roleVersionId": 5012,
"message": "Role created successfully in pending state."
}

Properties Format (format=properties):

status=success
roleVersionId=5012
message=Role created successfully in pending state.

Verified with RSA Governance & Lifecycle version 8.0.0.

References​