curl --location 'https://your-cloud-id.threataware.com/public-api/v1/settings/usermanagement/roles' \
--header 'Accept: application/json' \
--header 'X-ThreatAware-ApiKey: your-api-key-here'
import requests
API_KEY = "your-api-key-here"
CLOUD_ID = "sandbox"
BASE_URL = f"https://{CLOUD_ID}.threataware.com/public-api/v1"
headers = {
"Accept": "application/json",
"X-ThreatAware-ApiKey": API_KEY
}
response = requests.get(
f"{BASE_URL}/settings/usermanagement/roles",
headers=headers
)
roles = response.json()
print(f"Retrieved {len(roles['data'])} roles")
# Example: Find custom (non-default) roles
custom_roles = [r for r in roles['data'] if not r.get('default', False)]
print(f"Custom roles: {len(custom_roles)}")
const axios = require('axios');
const API_KEY = 'your-api-key-here';
const CLOUD_ID = 'sandbox';
const BASE_URL = `https://${CLOUD_ID}.threataware.com/public-api/v1`;
axios.get(`${BASE_URL}/settings/usermanagement/roles`, {
headers: {
'Accept': 'application/json',
'X-ThreatAware-ApiKey': API_KEY
}
})
.then(response => {
console.log(`Retrieved ${response.data.data.length} roles`);
// Example: List role names
response.data.data.forEach(role => {
console.log(`- ${role.name} (${role.users.length} users)`);
});
});
$ApiKey = "your-api-key-here"
$CloudId = "sandbox"
$BaseUrl = "https://$CloudId.threataware.com/public-api/v1"
$Headers = @{
"Accept" = "application/json"
"X-ThreatAware-ApiKey" = $ApiKey
}
$Response = Invoke-RestMethod `
-Uri "$BaseUrl/settings/usermanagement/roles" `
-Headers $Headers `
-Method Get
Write-Host "Retrieved $($Response.data.Count) roles"
# Example: Show role summary
$Response.data | Select-Object name, @{Name="Users";Expression={$_.users.Count}} | Format-Table
{
"offset": 0,
"limit": 1,
"total": 10,
"data": [
{
"id": "superAdmin",
"name": "Super Admin",
"description": "Grants the users the highest level of privilege in the platform.",
"permissions": {
"deviceVisibility": "All",
"userVisibility": "All",
"integrations": "Manage",
"alertNotes": "Manage",
"deviceNotes": "Manage",
"userNotes": "Manage",
"globalTags": "Manage",
"apiKeys": "Manage",
"miscellaneous": "Manage",
"reports": "Export",
"scheduledReports": "Manage",
"previousReports": "Download",
"browserExtensionAccess": "Login",
"vitals": "Manage",
"workflowAutomation": "Manage",
"vitalsAlerts": "Action",
"users": "Manage",
"roles": "Manage",
"teams": "Manage",
"ssoSetup": "Manage"
},
"default": true,
"users": [
{
"username": "brandon.taylor@company.com",
"name": "Brandon",
"surname": "Taylor"
},
{
"username": "gavin.watkins@company.com",
"name": "Gavin",
"surname": "Watkins"
},
{
"username": "julian.edwards@company.com",
"name": "Julian",
"surname": "Edwards"
}
]
}
],
"success": true,
"statusCode": 200,
"message": "Successfully retrieved roles."
}
Settings & Management
Get Roles
Retrieve data for all roles registered on the platform
GET
/
public-api
/
v1
/
settings
/
usermanagement
/
roles
curl --location 'https://your-cloud-id.threataware.com/public-api/v1/settings/usermanagement/roles' \
--header 'Accept: application/json' \
--header 'X-ThreatAware-ApiKey: your-api-key-here'
import requests
API_KEY = "your-api-key-here"
CLOUD_ID = "sandbox"
BASE_URL = f"https://{CLOUD_ID}.threataware.com/public-api/v1"
headers = {
"Accept": "application/json",
"X-ThreatAware-ApiKey": API_KEY
}
response = requests.get(
f"{BASE_URL}/settings/usermanagement/roles",
headers=headers
)
roles = response.json()
print(f"Retrieved {len(roles['data'])} roles")
# Example: Find custom (non-default) roles
custom_roles = [r for r in roles['data'] if not r.get('default', False)]
print(f"Custom roles: {len(custom_roles)}")
const axios = require('axios');
const API_KEY = 'your-api-key-here';
const CLOUD_ID = 'sandbox';
const BASE_URL = `https://${CLOUD_ID}.threataware.com/public-api/v1`;
axios.get(`${BASE_URL}/settings/usermanagement/roles`, {
headers: {
'Accept': 'application/json',
'X-ThreatAware-ApiKey': API_KEY
}
})
.then(response => {
console.log(`Retrieved ${response.data.data.length} roles`);
// Example: List role names
response.data.data.forEach(role => {
console.log(`- ${role.name} (${role.users.length} users)`);
});
});
$ApiKey = "your-api-key-here"
$CloudId = "sandbox"
$BaseUrl = "https://$CloudId.threataware.com/public-api/v1"
$Headers = @{
"Accept" = "application/json"
"X-ThreatAware-ApiKey" = $ApiKey
}
$Response = Invoke-RestMethod `
-Uri "$BaseUrl/settings/usermanagement/roles" `
-Headers $Headers `
-Method Get
Write-Host "Retrieved $($Response.data.Count) roles"
# Example: Show role summary
$Response.data | Select-Object name, @{Name="Users";Expression={$_.users.Count}} | Format-Table
{
"offset": 0,
"limit": 1,
"total": 10,
"data": [
{
"id": "superAdmin",
"name": "Super Admin",
"description": "Grants the users the highest level of privilege in the platform.",
"permissions": {
"deviceVisibility": "All",
"userVisibility": "All",
"integrations": "Manage",
"alertNotes": "Manage",
"deviceNotes": "Manage",
"userNotes": "Manage",
"globalTags": "Manage",
"apiKeys": "Manage",
"miscellaneous": "Manage",
"reports": "Export",
"scheduledReports": "Manage",
"previousReports": "Download",
"browserExtensionAccess": "Login",
"vitals": "Manage",
"workflowAutomation": "Manage",
"vitalsAlerts": "Action",
"users": "Manage",
"roles": "Manage",
"teams": "Manage",
"ssoSetup": "Manage"
},
"default": true,
"users": [
{
"username": "brandon.taylor@company.com",
"name": "Brandon",
"surname": "Taylor"
},
{
"username": "gavin.watkins@company.com",
"name": "Gavin",
"surname": "Watkins"
},
{
"username": "julian.edwards@company.com",
"name": "Julian",
"surname": "Edwards"
}
]
}
],
"success": true,
"statusCode": 200,
"message": "Successfully retrieved roles."
}
Overview
The Roles endpoint provides access to role definitions, permissions, and assigned users within the ThreatAware platform.Parameters
number
default:"0"
Set the start position of the data returned by the API
number
default:"0"
Limit each request by the provided number. Leave blank or as 0 to return all data available
Authentication
string
required
Your ThreatAware API key
string
default:"application/json"
Response format
Response
number
The starting position of this result set
number
The number of results returned
number
Total number of roles
boolean
Whether the request was successful
number
HTTP status code
string
Status message
array
Show Role Object
Show Role Object
string
Role identifier (e.g.,
superAdmin, analyst, viewer)string
Human-readable role name
string
Description of the role and its purpose
boolean
Whether this is a default (built-in) role
object
Show Permission Object
Show Permission Object
Granular permissions for various platform features:
deviceVisibility: Access level to devices (All,Team,None)userVisibility: Access level to usersintegrations: Integration management permissionvitals: Vitals configuration permissionworkflowAutomation: Action/automation permissionusers: User management permissionroles: Role management permissionteams: Team management permission- And many more…
curl --location 'https://your-cloud-id.threataware.com/public-api/v1/settings/usermanagement/roles' \
--header 'Accept: application/json' \
--header 'X-ThreatAware-ApiKey: your-api-key-here'
import requests
API_KEY = "your-api-key-here"
CLOUD_ID = "sandbox"
BASE_URL = f"https://{CLOUD_ID}.threataware.com/public-api/v1"
headers = {
"Accept": "application/json",
"X-ThreatAware-ApiKey": API_KEY
}
response = requests.get(
f"{BASE_URL}/settings/usermanagement/roles",
headers=headers
)
roles = response.json()
print(f"Retrieved {len(roles['data'])} roles")
# Example: Find custom (non-default) roles
custom_roles = [r for r in roles['data'] if not r.get('default', False)]
print(f"Custom roles: {len(custom_roles)}")
const axios = require('axios');
const API_KEY = 'your-api-key-here';
const CLOUD_ID = 'sandbox';
const BASE_URL = `https://${CLOUD_ID}.threataware.com/public-api/v1`;
axios.get(`${BASE_URL}/settings/usermanagement/roles`, {
headers: {
'Accept': 'application/json',
'X-ThreatAware-ApiKey': API_KEY
}
})
.then(response => {
console.log(`Retrieved ${response.data.data.length} roles`);
// Example: List role names
response.data.data.forEach(role => {
console.log(`- ${role.name} (${role.users.length} users)`);
});
});
$ApiKey = "your-api-key-here"
$CloudId = "sandbox"
$BaseUrl = "https://$CloudId.threataware.com/public-api/v1"
$Headers = @{
"Accept" = "application/json"
"X-ThreatAware-ApiKey" = $ApiKey
}
$Response = Invoke-RestMethod `
-Uri "$BaseUrl/settings/usermanagement/roles" `
-Headers $Headers `
-Method Get
Write-Host "Retrieved $($Response.data.Count) roles"
# Example: Show role summary
$Response.data | Select-Object name, @{Name="Users";Expression={$_.users.Count}} | Format-Table
{
"offset": 0,
"limit": 1,
"total": 10,
"data": [
{
"id": "superAdmin",
"name": "Super Admin",
"description": "Grants the users the highest level of privilege in the platform.",
"permissions": {
"deviceVisibility": "All",
"userVisibility": "All",
"integrations": "Manage",
"alertNotes": "Manage",
"deviceNotes": "Manage",
"userNotes": "Manage",
"globalTags": "Manage",
"apiKeys": "Manage",
"miscellaneous": "Manage",
"reports": "Export",
"scheduledReports": "Manage",
"previousReports": "Download",
"browserExtensionAccess": "Login",
"vitals": "Manage",
"workflowAutomation": "Manage",
"vitalsAlerts": "Action",
"users": "Manage",
"roles": "Manage",
"teams": "Manage",
"ssoSetup": "Manage"
},
"default": true,
"users": [
{
"username": "brandon.taylor@company.com",
"name": "Brandon",
"surname": "Taylor"
},
{
"username": "gavin.watkins@company.com",
"name": "Gavin",
"surname": "Watkins"
},
{
"username": "julian.edwards@company.com",
"name": "Julian",
"surname": "Edwards"
}
]
}
],
"success": true,
"statusCode": 200,
"message": "Successfully retrieved roles."
}
Common Roles
Super Admin
Super Admin
Full platform access
- All permissions enabled
- User, role, and team management
- Integration and API key management
- SSO configuration
Analyst
Analyst
Security operations focus
- View all devices and users
- Manage alerts and actions
- Export reports
- Limited administrative access
Viewer
Viewer
Read-only access
- View devices, users, and alerts
- Generate reports
- No modification permissions
Use Cases
Access Review
Export role assignments for periodic access reviews
Compliance Reporting
Document role-based access control (RBAC) for audits
Permission Auditing
Track which users have administrative permissions
Onboarding Automation
Automate role assignment based on department or job title
Related Endpoints
Get Users
View user accounts and their assigned roles
Get Teams
View team structure and members