Remove Group From Role
Remove a user group from a role.
POST https://instance.securid.com/aveksa/command.submit?cmd=removeGroupFromRole
Request
Parameters
| removeGroupFromRole | |
| The ID of the user group to remove from the role. | |
| The ID of the role from which the group will be removed. | |
| format | properties - (Default) Returns the response as key=value pairs.json - Returns the response as JSON. |
| token | Deprecated. Use the Authorization request header instead. |
Headers
Bearer token | |
| Accept | application/json |
| Content-Type | application/json |
Response
Parameters
status | success or failure |
message | Optional message returned with the status. |
Examples
Request
- Curl
- Python
- Node.js
curl -K -X POST \
"https://instance.securid.com/aveksa/command.submit?cmd=removeGroupFromRole&format=json&groupId=52&roleId=6764" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "removeGroupFromRole",
"format": "json",
"groupId": "52",
"roleId": "6764"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
response = requests.post(url, params=params, headers=headers)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Request failed with status code {response.status_code}")
const axios = require('axios');
const url = "https://instance.securid.com/aveksa/command.submit";
const params = {
cmd: "removeGroupFromRole",
format: "json",
groupId: "52",
roleId: "6764"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
axios.post(url, null, { params, headers })
.then(response => {
if (response.status === 200) {
console.log(response.data);
} else {
console.log(`Request failed with status code ${response.status}`);
}
})
.catch(error => {
console.error('Error:', error);
});
Response
- 200
- 401 Invalid Token
- 404 Not Found
- 412 Missing Parameter
{
"data": {
"status": "success"
}
}
<html>
<head>
<title>Error</title>
</head>
<body>The token is not valid for the command 'removeGroupFromRole'. Token is invalid or expired</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>The role with ID <roleId> could not be found.
Query String=cmd=removeGroupFromRole&format=json&groupId=<groupId>&roleId=<roleId></body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>The parameter groupId is required and should be a number.
Query String=cmd=removeGroupFromRole&format=json&roleId=<roleId></body>
</html>
Verified with RSA Governance & Lifecycle version 8.0.0.188886 P10_HF01.
See Also
- Add Group To Role: Add a user group to a role
- Commit Role: Commit pending changes to a role