Collect Roles
Run one or more role collectors.
GET https://instance.securid.com/aveksa/command.submit?cmd=collectRoles
note
Requires a user with System:Manage privilege.
Request
Parameters
| collectRoles | |
| format | properties - (Default) Returns the response as key=value pairs. When multiple collectors run, run-id is a CSV of all run IDs.json - Returns the response as JSON. |
| name | The friendly name of the collector to run. If omitted, all role collectors are processed. |
| force | Set to true to ignore circuit breaker thresholds and force collection regardless of prior run state. |
Headers
Bearer token | |
| Accept | application/json |
| Content-Type | application/json |
Response
Parameters
run-id | The ID assigned to the collection run. When multiple collectors run, this is a CSV of all run IDs. |
run-source-xx | The name of the collector for run ID xx. One key appears per collector that ran. |
Examples
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=collectRoles&format=json&name=Sample+RDC" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "collectRoles",
"format": "json",
"name": "Sample RDC"
}
headers = {
'Authorization': 'Bearer <token>'
}
response = requests.get(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: "collectRoles",
format: "json",
name: "Sample RDC"
};
const headers = {
'Authorization': 'Bearer <token>'
};
axios.get(url, { 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 (Properties)
- 200 (JSON)
- 401 Invalid Token
- 404 Invalid name
Default format when format is omitted.
run-id=1001
run-source-1001=Sample RDC
{
"data": {
"type": "collectRoles",
"run-id": "1001",
"run-source-1001": "Sample RDC"
}
}
<html>
<head>
<title>Error</title>
</head>
<body>The token is not valid for the command 'collectRoles'. Token is invalid or expired</body>
</html>
Returned when the name value does not match any role collector.
<html>
<head>
<title>Error</title>
</head>
<body>Error running a collection for the role collector InvalidName
Query String=cmd=collectRoles&format=json&name=InvalidName</body>
</html>
Verified with RSA Governance & Lifecycle version 8.0.0.188886 P10_HF01.