Find Roles
Find roles in the identity store. The command uses the PV_ROLES public view to find data. Any filters passed should apply to this public view.
GET https://instance.securid.com/aveksa/command.submit?cmd=findRoles
Request
Parameters
| findRoles | |
| format | properties - (Default) Returns the response as key=value pairs. When multiple objects are returned, values are comma-delimited: key=value1,value2,value3.json - Returns the response as JSON.csv - Returns the response as comma-separated values.tsv - Returns the response as tab-separated values.xml - Returns the response as XML. |
| delimiter | The delimiter to use between values for csv and properties formats |
| returnColumns | The names of the columns to return. |
| returnMaxRows | The maximum number of objects to return |
| distinct | true, false Returns only distinct values, equivalent to the distinct keyword in SQL. |
| sortByColumns | The results will be sorted based on the columns listed using comma as the delimiter if multiple columns are specified. Refer to Columns table below. |
| sortDirection | Determines sorting order. asc for ascending, desc for descending. If not specified, the natural order returned by the database is used. |
| includeHeaderRow | true, false Include column headers when the return format is csv or tsv. (Default) true |
| ignoreCase | true, false Returns case-insensitive search results for specified filter parameters. (Default) false |
Filter Parameters
Any column listed in the Columns table can be passed as a filter parameter to narrow results. Filters are matched against the PV_ROLES public view.
Query logic
| Scenario | Behavior |
|---|---|
Two different parameters: type=BR&is_disabled=False | AND. Returns business roles that are currently active. |
Same parameter repeated: type=BR&type=GR | OR within that field. Returns business roles or global roles. |
Mixed: is_disabled=False&type=BR&type=GR | (is_disabled is False) AND (type is BR or GR) |
A single API call cannot return roles where type=BR OR is_disabled=False. OR logic between different filter parameters is not supported.
Workaround: Make separate requests for each filter condition. Merge and deduplicate the results client-side.
Columns
| id | [Primary Key] Unique role identifier |
| name | Role name |
| alt_name | Alternate display name for the role |
| short_desc | Short description of the role |
| long_desc | Long description of the role |
| url_ref | URL reference for more information about the role |
| type | Role type. BR = Business Role, GR = Global Role, TR = Technical Role |
| is_disabled | True, False Whether the role is currently disabled. Stored with a capital first letter. |
| rdc_id | [Foreign Key referencing ROLE_DEFINITION_COLLECTOR.ID] Role collector that owns this role. -1 indicates a manually created role. |
| roleset_id | [Foreign Key referencing ROLESET.ID] Role set this role belongs to |
| owner_id | [Foreign Key referencing USERS.ID] User ID of the role owner |
| backup_owner_id | [Foreign Key referencing USERS.ID] User ID of the backup owner |
| user_constraint | Constraint expression that defines which users are eligible for this role |
| ent_constraint | Constraint expression that defines which entitlements are in scope for this role |
| membership_type | How membership is determined. 0 = rules-based |
| membership_count | Number of users currently holding this role |
| entitlement_count | Number of entitlements associated with this role |
| canrequest | 1, 0 Whether this role is available for access request |
| violation_count | Number of open SoD violations for this role |
| exception_count | Number of open exceptions for this role |
| is_valid_membership | Y, N Whether the current membership is within policy constraints |
| add_state | Pending add workflow state. 0 = no pending add |
| remove_state | Pending remove workflow state. 0 = no pending remove |
| creation_date | Date and time the role was created |
| deletion_date | Date and time the role was deleted |
| last_reviewed_date | Date the role was last reviewed |
| in_const_rule_id | Rule ID for the in-constraint check |
| out_of_const_rule_id | Rule ID for the out-of-constraint check |
Headers
Bearer token | |
| Accept | application/json |
| Content-Type | application/json |
Response
Parameters
The API returns the requested columns specified by returnColumns as output. If returnColumns is unspecified then all columns listed will be returned.
Examples
All columns
Omit returnColumns to return every field for each role.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findRoles&format=json&returnMaxRows=5" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findRoles",
"format": "json",
"returnMaxRows": "5"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, params=params, headers=headers)
print(response.json())
const axios = require('axios');
axios.get("https://instance.securid.com/aveksa/command.submit", {
params: {
cmd: "findRoles",
format: "json",
returnMaxRows: "5"
},
headers: { Authorization: "Bearer <token>" }
}).then(r => console.log(r.data));
Response
- 200
{
"findRoles": [
{
"id": "6764",
"rdc_id": "-1",
"name": "Test Role 3",
"owner_id": "0",
"backup_owner_id": "",
"user_constraint": "",
"is_disabled": "False",
"creation_date": "2025-03-29 18:06:27.0",
"type": "BR",
"ent_constraint": "",
"roleset_id": "38",
"violation_count": "0",
"exception_count": "0",
"alt_name": "Test Role 3",
"short_desc": "",
"long_desc": "",
"url_ref": "",
"membership_count": "1",
"entitlement_count": "0",
"membership_type": "0",
"deletion_date": "",
"add_state": "0",
"remove_state": "0",
"canrequest": "1",
"in_const_rule_id": "",
"out_of_const_rule_id": "",
"is_valid_membership": "Y",
"last_reviewed_date": "2025-03-29 18:14:24.0"
}
]
}
Specific columns
Use returnColumns to limit the response to the fields you need.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findRoles&format=json&returnMaxRows=5&returnColumns=id,name,type,is_disabled,membership_count,entitlement_count" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findRoles",
"format": "json",
"returnMaxRows": "5",
"returnColumns": "id,name,type,is_disabled,membership_count,entitlement_count"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, params=params, headers=headers)
print(response.json())
const axios = require('axios');
axios.get("https://instance.securid.com/aveksa/command.submit", {
params: {
cmd: "findRoles",
format: "json",
returnMaxRows: "5",
returnColumns: "id,name,type,is_disabled,membership_count,entitlement_count"
},
headers: { Authorization: "Bearer <token>" }
}).then(r => console.log(r.data));
Response
- 200
- 412 Invalid column
{
"findRoles": [
{
"id": "6764",
"name": "Test Role 3",
"type": "BR",
"is_disabled": "False",
"membership_count": "1",
"entitlement_count": "0"
}
]
}
<html>
<head><title>Error</title></head>
<body>The parameter returncolumns contains an invalid column - `invalid_col`.
Query String=cmd=findRoles&format=json&returnMaxRows=2&returnColumns=id,invalid_col</body>
</html>
Filter by a single value
Pass any column name as a query parameter to filter results. The example returns roles where type is BR (Business Role).
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findRoles&format=json&returnMaxRows=5&returnColumns=id,name,type,is_disabled&type=BR" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findRoles",
"format": "json",
"returnMaxRows": "5",
"returnColumns": "id,name,type,is_disabled",
"type": "BR"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, params=params, headers=headers)
print(response.json())
const axios = require('axios');
axios.get("https://instance.securid.com/aveksa/command.submit", {
params: {
cmd: "findRoles",
format: "json",
returnMaxRows: "5",
returnColumns: "id,name,type,is_disabled",
type: "BR"
},
headers: { Authorization: "Bearer <token>" }
}).then(r => console.log(r.data));
Response
- 200
{
"findRoles": [
{
"id": "6764",
"name": "Test Role 3",
"type": "BR",
"is_disabled": "False"
}
]
}
Filter with OR logic
Repeat the same parameter with different values to match any of them. The example returns roles where type is BR or GR.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findRoles&format=json&returnMaxRows=5&returnColumns=id,name,type&type=BR&type=GR" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = [
("cmd", "findRoles"),
("format", "json"),
("returnMaxRows", "5"),
("returnColumns", "id,name,type"),
("type", "BR"),
("type", "GR")
]
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, params=params, headers=headers)
print(response.json())
const axios = require('axios');
const params = new URLSearchParams();
params.append('cmd', 'findRoles');
params.append('format', 'json');
params.append('returnMaxRows', '5');
params.append('returnColumns', 'id,name,type');
params.append('type', 'BR');
params.append('type', 'GR');
axios.get("https://instance.securid.com/aveksa/command.submit", {
params,
headers: { Authorization: "Bearer <token>" }
}).then(r => console.log(r.data));
Response
- 200
{
"findRoles": [
{
"id": "6764",
"name": "Test Role 3",
"type": "BR"
}
]
}
Case-insensitive filter
Filters are case-sensitive by default. Set ignoreCase=true to match regardless of case. The example passes is_disabled=false in lowercase and still returns roles where the stored value is False (capital F).
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findRoles&format=json&returnMaxRows=5&returnColumns=id,name,type,is_disabled&is_disabled=false&ignoreCase=true" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findRoles",
"format": "json",
"returnMaxRows": "5",
"returnColumns": "id,name,type,is_disabled",
"is_disabled": "false",
"ignoreCase": "true"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, params=params, headers=headers)
print(response.json())
const axios = require('axios');
axios.get("https://instance.securid.com/aveksa/command.submit", {
params: {
cmd: "findRoles",
format: "json",
returnMaxRows: "5",
returnColumns: "id,name,type,is_disabled",
is_disabled: "false",
ignoreCase: "true"
},
headers: { Authorization: "Bearer <token>" }
}).then(r => console.log(r.data));
Response
- 200
{
"findRoles": [
{
"id": "6764",
"name": "Test Role 3",
"type": "BR",
"is_disabled": "False"
}
]
}
Sort ascending
Use sortByColumns with a column name and sortDirection=asc to sort results. The example sorts by name.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findRoles&format=json&returnMaxRows=5&returnColumns=id,name,type&sortByColumns=name&sortDirection=asc" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findRoles",
"format": "json",
"returnMaxRows": "5",
"returnColumns": "id,name,type",
"sortByColumns": "name",
"sortDirection": "asc"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, params=params, headers=headers)
print(response.json())
const axios = require('axios');
axios.get("https://instance.securid.com/aveksa/command.submit", {
params: {
cmd: "findRoles",
format: "json",
returnMaxRows: "5",
returnColumns: "id,name,type",
sortByColumns: "name",
sortDirection: "asc"
},
headers: { Authorization: "Bearer <token>" }
}).then(r => console.log(r.data));
Response
- 200
{
"findRoles": [
{
"id": "6764",
"name": "Test Role 3",
"type": "BR"
}
]
}
Sort descending
Set sortDirection=desc to reverse the order.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findRoles&format=json&returnMaxRows=5&returnColumns=id,name,type&sortByColumns=name&sortDirection=desc" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findRoles",
"format": "json",
"returnMaxRows": "5",
"returnColumns": "id,name,type",
"sortByColumns": "name",
"sortDirection": "desc"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, params=params, headers=headers)
print(response.json())
const axios = require('axios');
axios.get("https://instance.securid.com/aveksa/command.submit", {
params: {
cmd: "findRoles",
format: "json",
returnMaxRows: "5",
returnColumns: "id,name,type",
sortByColumns: "name",
sortDirection: "desc"
},
headers: { Authorization: "Bearer <token>" }
}).then(r => console.log(r.data));
Response
- 200
{
"findRoles": [
{
"id": "6764",
"name": "Test Role 3",
"type": "BR"
}
]
}
CSV with custom delimiter
Set format=csv for a comma-separated response. Use delimiter to change the separator character.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findRoles&format=csv&returnMaxRows=5&returnColumns=id,name,type,is_disabled&delimiter=~" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findRoles",
"format": "csv",
"returnMaxRows": "5",
"returnColumns": "id,name,type,is_disabled",
"delimiter": "~"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, params=params, headers=headers)
print(response.text)
const axios = require('axios');
axios.get("https://instance.securid.com/aveksa/command.submit", {
params: {
cmd: "findRoles",
format: "csv",
returnMaxRows: "5",
returnColumns: "id,name,type,is_disabled",
delimiter: "~"
},
headers: { Authorization: "Bearer <token>" }
}).then(r => console.log(r.data));
Response
- 200
id~name~type~is_disabled
6764~Test Role 3~BR~False
CSV without header row
Set includeHeaderRow=false when your downstream system expects raw data rows without a header.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findRoles&format=csv&returnMaxRows=5&returnColumns=id,name,type,is_disabled&includeHeaderRow=false" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findRoles",
"format": "csv",
"returnMaxRows": "5",
"returnColumns": "id,name,type,is_disabled",
"includeHeaderRow": "false"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, params=params, headers=headers)
print(response.text)
const axios = require('axios');
axios.get("https://instance.securid.com/aveksa/command.submit", {
params: {
cmd: "findRoles",
format: "csv",
returnMaxRows: "5",
returnColumns: "id,name,type,is_disabled",
includeHeaderRow: "false"
},
headers: { Authorization: "Bearer <token>" }
}).then(r => console.log(r.data));
Response
- 200
6764,Test Role 3,BR,False
Error responses
A 401 is returned when the token is missing, invalid, or expired. A 412 is returned when returnColumns includes a column name that does not exist in the PV_ROLES public view.
- 401 Invalid token
- 412 Invalid column
<html>
<head><title>Error</title></head>
<body>The token is not valid for the command 'findRoles'. Token is invalid or expired</body>
</html>
<html>
<head><title>Error</title></head>
<body>The parameter returncolumns contains an invalid column - `invalid_col`.
Query String=cmd=findRoles&format=json&returnMaxRows=2&returnColumns=id,invalid_col</body>
</html>
Verified with RSA Governance & Lifecycle version 8.0.0.188886 P10_HF01.