Find Accounts
Find accounts. The command uses the PV_ACCOUNT public view to find data. Any filters passed should be passed on this public view.
GET https://instance.securid.com/aveksa/command.submit?cmd=findAccounts
Request
Parameters
| findAccounts | |
| format |
xml - Extensible Markup Language |
| 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 |
Columns
| id | [Primary Key] Unique account identifier |
| name | Account name |
| creation_date | Date stamp when this account was created. |
| deletion_date | The date stamp when this account was removed. |
| application_id | [Foreign Key referencing APPLICATION.ID] Application/Directory id. |
| adc_id | [Foreign Key referencing ACCOUNT_COLLECTOR.ID] Account collector id. |
| adc_name | Account collector name. |
| is_shared | Whether this account is shared by multiple users. |
| last_login_date | Last time when a user logged in using this account. |
| orphaned_date | Date an account became orphaned. |
| is_locked | True, False Indicates if the current account is locked. |
| is_disabled | True, False Indicates if the current account is disabled. |
| object_sid | Holds a unique string formatted value for an account created from Active Directory. This unique account value is used in resolving Active Directory 'Foreign Security Principles' group memberships. |
| expiration_date | The date on which the account expires. |
| last_login | Last login. |
| user_name | User name. |
| property_1 | Account property 1. |
| property_2 | Account property 2. |
| property_3 | Account property 3. |
| property_4 | Account property 4. |
| user_account_control | User account control flags. |
| external_id | External identifier for the account. |
| status | Status of the account. |
| last_reviewed_date | Last reviewed date. |
| cad1 | Value of custom date type attributes configured on the instance represented by their reference names. |
| cas3 | Value of custom string type attributes configured on the instance represented by their reference names. |
| cas4 | Value of custom string type attributes configured on the instance represented by their reference names. |
| cas5 | Value of custom string type attributes configured on the instance represented by their reference names. |
| cas6 | Value of custom string type attributes configured on the instance represented by their reference names. |
| cas7 | Value of custom string type attributes configured on the instance represented by their reference names. |
| cas8 | Value of custom string type attributes configured on the instance represented by their reference names. |
| cas9 | Value of custom string type attributes configured on the instance represented by their reference names. |
| cas20 | Value of custom string type attributes configured on the instance represented by their reference names. |
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 account.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findAccounts&format=json&returnMaxRows=2" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findAccounts",
"format": "json",
"returnMaxRows": "2"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
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: "findAccounts",
format: "json",
returnMaxRows: "2"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
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
{
"findAccounts": [
{
"id": "3",
"name": "user01",
"creation_date": "2024-03-15 06:03:50.0",
"deletion_date": "",
"application_id": "2",
"adc_id": "4",
"adc_name": "Corporate AD Collector",
"is_shared": "n",
"last_login_date": "",
"orphaned_date": "",
"is_locked": "0",
"is_disabled": "0",
"object_sid": "",
"expiration_date": "",
"last_login": "",
"user_name": "",
"property_1": "",
"property_2": "",
"property_3": "",
"property_4": "",
"user_account_control": "NORMAL_ACCOUNT",
"external_id": "CN=user01,OU=Professional Services,OU=Users,OU=corp,DC=example,DC=securid,DC=com",
"status": "",
"last_reviewed_date": "",
"cad1": "",
"cas3": "",
"cas4": "",
"cas5": "",
"cas6": "",
"cas7": "",
"cas8": "NORMAL_ACCOUNT",
"cas9": "CN=user01,OU=Professional Services,OU=Users,OU=corp,DC=example,DC=securid,DC=com",
"cas20": ""
},
{
"id": "4",
"name": "user02",
"creation_date": "2024-03-15 06:03:50.0",
"deletion_date": "",
"application_id": "2",
"adc_id": "4",
"adc_name": "Corporate AD Collector",
"is_shared": "n",
"last_login_date": "",
"orphaned_date": "",
"is_locked": "0",
"is_disabled": "0",
"object_sid": "",
"expiration_date": "",
"last_login": "",
"user_name": "",
"property_1": "",
"property_2": "",
"property_3": "",
"property_4": "",
"user_account_control": "NORMAL_ACCOUNT,DONT_EXPIRE_PASSWORD",
"external_id": "CN=user02,OU=Professional Services,OU=Users,OU=corp,DC=example,DC=securid,DC=com",
"status": "",
"last_reviewed_date": "",
"cad1": "",
"cas3": "",
"cas4": "",
"cas5": "",
"cas6": "",
"cas7": "",
"cas8": "NORMAL_ACCOUNT,DONT_EXPIRE_PASSWORD",
"cas9": "CN=user02,OU=Professional Services,OU=Users,OU=corp,DC=example,DC=securid,DC=com",
"cas20": ""
}
]
}
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=findAccounts&format=json" \
"&returnColumns=id,name,application_id,adc_id,adc_name&returnMaxRows=3" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findAccounts",
"format": "json",
"returnColumns": "id,name,application_id,adc_id,adc_name",
"returnMaxRows": "3"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
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: "findAccounts",
format: "json",
returnColumns: "id,name,application_id,adc_id,adc_name",
returnMaxRows: "3"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
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
- 412 Invalid column
{
"findAccounts": [
{
"id": "3",
"name": "user01",
"application_id": "2",
"adc_id": "4",
"adc_name": "Corporate AD Collector"
},
{
"id": "4",
"name": "user02",
"application_id": "2",
"adc_id": "4",
"adc_name": "Corporate AD Collector"
},
{
"id": "7",
"name": "user03",
"application_id": "2",
"adc_id": "4",
"adc_name": "Corporate AD Collector"
}
]
}
<html>
<head><title>Error</title></head>
<body>The parameter returncolumns contains an invalid column - `invalid_col`.
Query String=cmd=findAccounts&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. Only accounts that match the value are returned.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findAccounts&format=json" \
"&returnColumns=id,name,adc_id,adc_name&returnMaxRows=3&adc_id=4" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findAccounts",
"format": "json",
"returnColumns": "id,name,adc_id,adc_name",
"returnMaxRows": "3",
"adc_id": "4"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
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: "findAccounts",
format: "json",
returnColumns: "id,name,adc_id,adc_name",
returnMaxRows: "3",
adc_id: "4"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
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
{
"findAccounts": [
{
"id": "47",
"name": "user47",
"adc_id": "4",
"adc_name": "Corporate AD Collector"
},
{
"id": "27",
"name": "user27",
"adc_id": "4",
"adc_name": "Corporate AD Collector"
},
{
"id": "244654",
"name": "user244",
"adc_id": "4",
"adc_name": "Corporate AD Collector"
}
]
}
Filter with OR logic
Repeat the same parameter with different values to match any of them.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findAccounts&format=json" \
"&returnColumns=id,name,adc_id&returnMaxRows=3&adc_id=1&adc_id=4" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findAccounts",
"format": "json",
"returnColumns": "id,name,adc_id",
"returnMaxRows": "3",
"adc_id": ["1", "4"]
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
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 = new URLSearchParams({
cmd: "findAccounts",
format: "json",
returnColumns: "id,name,adc_id",
returnMaxRows: "3"
});
params.append("adc_id", "1");
params.append("adc_id", "4");
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
axios.get(url + "?" + params.toString(), { 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
{
"findAccounts": [
{
"id": "53",
"name": "AveksaAdmin",
"adc_id": "1"
},
{
"id": "57",
"name": "user57",
"adc_id": "1"
},
{
"id": "245056",
"name": "user27",
"adc_id": "1"
}
]
}
Case-insensitive filter
Set ignoreCase=true to match regardless of case. The example passes name=USER01 in uppercase and returns the lowercase account user01.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findAccounts&format=json" \
"&returnColumns=id,name,adc_id&name=USER01&ignoreCase=true" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findAccounts",
"format": "json",
"returnColumns": "id,name,adc_id",
"name": "USER01",
"ignoreCase": "true"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
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: "findAccounts",
format: "json",
returnColumns: "id,name,adc_id",
name: "USER01",
ignoreCase: "true"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
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
{
"findAccounts": [
{
"id": "3",
"name": "user01",
"adc_id": "4"
}
]
}
Sort ascending
Set sortDirection=asc with sortByColumns to order results from lowest to highest.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findAccounts&format=json" \
"&returnColumns=id,name,adc_id&returnMaxRows=3&sortByColumns=id&sortDirection=asc" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findAccounts",
"format": "json",
"returnColumns": "id,name,adc_id",
"returnMaxRows": "3",
"sortByColumns": "id",
"sortDirection": "asc"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
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: "findAccounts",
format: "json",
returnColumns: "id,name,adc_id",
returnMaxRows: "3",
sortByColumns: "id",
sortDirection: "asc"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
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
{
"findAccounts": [
{
"id": "3",
"name": "user01",
"adc_id": "4"
},
{
"id": "4",
"name": "user02",
"adc_id": "4"
},
{
"id": "7",
"name": "user03",
"adc_id": "4"
}
]
}
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=findAccounts&format=json" \
"&returnColumns=id,name,adc_id&returnMaxRows=3&sortByColumns=id&sortDirection=desc" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findAccounts",
"format": "json",
"returnColumns": "id,name,adc_id",
"returnMaxRows": "3",
"sortByColumns": "id",
"sortDirection": "desc"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
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: "findAccounts",
format: "json",
returnColumns: "id,name,adc_id",
returnMaxRows: "3",
sortByColumns: "id",
sortDirection: "desc"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
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
{
"findAccounts": [
{
"id": "2894873",
"name": "svc01@example.com",
"adc_id": "815"
},
{
"id": "2894872",
"name": "svc02@example.com",
"adc_id": "815"
},
{
"id": "2894871",
"name": "svc03@example.com",
"adc_id": "815"
}
]
}
CSV with custom delimiter
Set format=csv and use delimiter to change the separator character.
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findAccounts&format=csv" \
"&returnColumns=id,name,adc_id&returnMaxRows=3&delimiter=~" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findAccounts",
"format": "csv",
"returnColumns": "id,name,adc_id",
"returnMaxRows": "3",
"delimiter": "~"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
response = requests.get(url, params=params, headers=headers)
if response.status_code == 200:
print(response.text)
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: "findAccounts",
format: "csv",
returnColumns: "id,name,adc_id",
returnMaxRows: "3",
delimiter: "~"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
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
id~name~adc_id
3~user01~4
4~user02~4
7~user03~4
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=findAccounts&format=csv" \
"&returnColumns=id,name,adc_id&returnMaxRows=3&includeHeaderRow=false" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findAccounts",
"format": "csv",
"returnColumns": "id,name,adc_id",
"returnMaxRows": "3",
"includeHeaderRow": "false"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
response = requests.get(url, params=params, headers=headers)
if response.status_code == 200:
print(response.text)
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: "findAccounts",
format: "csv",
returnColumns: "id,name,adc_id",
returnMaxRows: "3",
includeHeaderRow: "false"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
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
3,user01,4
4,user02,4
7,user03,4
Error responses
A 401 is returned when the token is missing, invalid, or expired. A 412 is returned when returnColumns includes a column that does not exist in the PV_ACCOUNT public view.
- 401 Invalid token
- 412 Invalid column
<html>
<head><title>Error</title></head>
<body>The token is not valid for the command 'findAccounts'. 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=findAccounts&format=json&returnMaxRows=2&returnColumns=id,invalid_col</body>
</html>
Verified with RSA Governance & Lifecycle version 8.0.0.188886 P10_HF01.