Find Business Units
Find business units. The command uses the PV_BUSINESS_UNIT public view to find data. Any filters passed should be passed on this public view.
GET https://instance.securid.com/aveksa/command.submit?cmd=findBusinessUnits
Request
Parameters
findBusinessUnits | |
format |
xml - Extensible Markup Language |
delimiter | The delimiter to use between values for csv, properties formats |
returnColumns | The names of the columns to return. returnColumns may be a CSV list of multiple column names. The returnColumns parameter may also be listed multiple times (ie returnColumns=col1,col2&returnColumns=col3,col4) Refer to Columns table below. |
returnMaxRows | The maximum number of objects to return |
distinct | true, false Returns only distinct values similar 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 | This determines sorting order. When defined as 'asc' the sorting is in ascending order else in 'desc' descending order. If this parameter is not specified, the natural order of rows returned by database is used. |
includeHeaderRow | true, false To include column headers when the return format is csv, tsv . (Default) true |
ignoreCase | true, false Returns case insensitive search result for specified filter parameters. (Default) false |
Columns
id | [Primary Key] Unique application identifier |
name | Business unit name |
created_by | [Foreign Key referencing USERS.ID] User id that created this business unit. |
creation_date | Date stamp when this business unit was created |
business_owner | [Foreign Key referencing USERS.ID] Business owner user id |
technical_owner | [Foreign Key referencing USERS.ID] Technical owner user id |
violation_manager | [Foreign Key referencing USERS.ID] Name of the violation manager user id |
backup_business_owner | [Foreign Key referencing USERS.ID] Backup business owner |
backup_technical_owner | [Foreign Key referencing USERS.ID] Backup technical owner |
cau1 | Value of custom user type attributes configured on the instance represented by their database IDs |
cad1 | Value of custom date type attributes configured on the instance represented by their database IDs |
cas1 | Value of custom string type attributes configured on the instance represented by their database IDs |
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
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=findBusinessUnits&format=json" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "findBusinessUnits",
"format": "json",
"returnColumns": "id,name,business_owner,technical_owner",
"returnMaxRows": "50",
"distinct": "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: "findBusinessUnits",
format: "json",
returnColumns: "id,name,business_owner,technical_owner",
returnMaxRows: "50",
distinct: "true"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
axios.get(url, { params, headers })
.then(response => {
if (response.status === 200) {
const data = response.data;
console.log(data);
} else {
console.log(`Request failed with status code ${response.status}`);
}
})
.catch(error => {
console.error('Error:', error);
});
Response
- 200
- 412 Invalid Parameter
{
"findBusinessUnits": [
{
"id": "1",
"name": "Audit & Compliance",
"creation_date": "2023-08-28 23:30:02.0",
"created_by": "0",
"business_owner": "233",
"technical_owner": "225145",
"violation_manager": "247964",
"backup_business_owner": "",
"backup_technical_owner": "",
"property_2": "",
"property_1": "",
"cau1": "",
"cau2": "",
"cad1": "",
"cas3": ""
}
]
}
<html>
<head>
<title>Error</title>
</head>
<body>The parameter returncolumns contains an invalid column - `cas3`.
Query String=cmd=findBusinessUnits&format=json&returnColumns=id,CAS3</body>
</html>