Commit Role
Commit pending configuration changes to a role definition in RSA Governance & Lifecycle.
POST https://instance.securid.com/aveksa/command.submit?cmd=commitRole
Purpose
The commitRole command commits current changes staged on a specified Role ID. When changes are made using role management commands (such as creating roles, updating metadata, or modifying group memberships), the role enters a pending or draft state. Executing commitRole generates an internal change request to apply the modifications.
Parameters are passed as URL query parameters using an HTTP POST request.
Request
Parameters
| Parameter | Type | Requirement | Description |
|---|---|---|---|
cmd | string | Command name: commitRole. | |
roleId | integer | The ID of the role for which changes need to be committed. | |
format | string | Optional | The 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. |
token | string | Deprecated | Session token retrieved from loginUser. Deprecated. Use the Authorization request header instead. |
Request Headers
| Header | Type | Requirement | Description |
|---|---|---|---|
Authorization | string | Bearer token for a user with system administrator privileges, obtained via loginUser. Format: Bearer <token>. | |
Accept | string | Optional | Desired response MIME type (for example, application/json or text/plain). |
Content-Type | string | Optional | Content type header: application/x-www-form-urlencoded or application/json. |
The Authorization request header replaces the deprecated token URL query parameter.
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 commit role).
Response
Parameters
| Parameter | Type | Description |
|---|---|---|
crId | integer | Change request ID generated for updating the specified Role ID. |
crName | string | Change request name generated for updating the specified Role ID. |
status | string | Execution result: success or failure. |
message | string | Optional diagnostic or informational message returned by the server. |
Examples
Request
- Curl
- Python
- Node.js
- PowerShell
curl -X POST \
"https://instance.securid.com/aveksa/command.submit?cmd=commitRole&roleId=3&format=json" \
-H "Authorization: Bearer <user-token>" \
-H "Accept: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "commitRole",
"roleId": 3,
"format": "json"
}
headers = {
"Authorization": "Bearer <user-token>",
"Accept": "application/json"
}
response = requests.post(url, params=params, headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f"Request failed: {response.status_code} - {response.text}")
const axios = require('axios');
const url = "https://instance.securid.com/aveksa/command.submit";
const params = {
cmd: 'commitRole',
roleId: 3,
format: 'json'
};
const headers = {
Authorization: 'Bearer <user-token>',
Accept: 'application/json'
};
axios.post(url, null, { params, headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Request failed:', error.response ? error.response.data : error.message);
});
$uri = "https://instance.securid.com/aveksa/command.submit?cmd=commitRole&roleId=3&format=json"
$headers = @{
"Authorization" = "Bearer <user-token>"
"Accept" = "application/json"
}
$response = Invoke-RestMethod -Uri $uri -Method Post -Headers $headers
$response
Response
- 200 OK
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 412 Precondition Failed
JSON Format (format=json):
{
"status": "success",
"crId": 1042,
"crName": "Update Role: Security Analyst",
"message": "Role committed successfully."
}
Properties Format (format=properties):
status=success
crId=1042
crName=Update Role: Security Analyst
message=Role committed successfully.
Missing Token:
<html>
<head><title>Error</title></head>
<body>The token is required for the command 'commitRole'</body>
</html>
Invalid or Expired Token:
<html>
<head><title>Error</title></head>
<body>The token is not valid for the command 'commitRole'. Token is invalid or expired</body>
</html>
Returned when calling with a Trusted Application token without user delegation, or when the user lacks the Role Administrator capability:
<html>
<head><title>Error</title></head>
<body>Not authorized to commit role.
Query String=cmd=commitRole&roleId=3&format=json</body>
</html>
<html>
<head><title>Error</title></head>
<body>The role with ID 3 could not be found.
Query String=cmd=commitRole&format=json&roleId=3</body>
</html>
<html>
<head><title>Error</title></head>
<body>The parameter roleId is required and should be a number.
Query String=cmd=commitRole&format=json</body>
</html>
Verified with RSA Governance & Lifecycle version 8.0.0.
References
- Add Group To Role: Add a user group to a role before committing
- Remove Group From Role: Remove a user group from a role before committing
- RFC 6750: OAuth 2.0 Bearer Token Usage
- RFC 7235: Hypertext Transfer Protocol (HTTP/1.1) Authentication