curl --location 'https://your-cloud-id.threataware.com/public-api/v1/devices?filter=active&limit=10' \
--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
}
params = {
"filter": "active",
"limit": 10
}
response = requests.get(f"{BASE_URL}/devices", headers=headers, params=params)
devices = response.json()
print(f"Retrieved {len(devices['data'])} active devices")
# Example: Find Windows devices
windows_devices = [d for d in devices['data'] if d['os'] == 'Windows']
print(f"Windows devices: {len(windows_devices)}")
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}/devices`, {
headers: {
'Accept': 'application/json',
'X-ThreatAware-ApiKey': API_KEY
},
params: {
filter: 'active',
limit: 10
}
})
.then(response => {
console.log(`Retrieved ${response.data.data.length} active devices`);
// Example: Filter by OS
const macDevices = response.data.data.filter(d => d.os === 'macOS');
console.log(`macOS devices: ${macDevices.length}`);
});
$ApiKey = "your-api-key-here"
$CloudId = "sandbox"
$BaseUrl = "https://$CloudId.threataware.com/public-api/v1"
$Headers = @{
"Accept" = "application/json"
"X-ThreatAware-ApiKey" = $ApiKey
}
$Params = @{
filter = "active"
limit = 10
}
$Response = Invoke-RestMethod -Uri "$BaseUrl/devices" -Headers $Headers -Body $Params -Method Get
Write-Host "Retrieved $($Response.data.Count) active devices"
# Example: Group by OS
$Response.data | Group-Object -Property os | Format-Table Name, Count
{
"offset": 0,
"limit": 1,
"total": 100,
"data": [
{
"hostName": "LAPTOP-001-FJ23Y",
"os": "Windows",
"osVersion": "Windows 11",
"lastOnline": "2022-10-10T08:49:28.0000000",
"location": {
"countryCode": "gb",
"country": "United Kingdom",
"city": "London"
},
"tags": [],
"metadata": {
"warranty_expiry": "2022-10-10 08:33:18",
"serial_number": "F11929BD2CF8",
"total_disk_storage": "230 GB",
"free_disk_storage": "31 GB",
"total_memory": "32 GB",
"cpu_speed": "2.91 GHz",
"model": "XPS 13",
"manufacturer": "Dell"
},
"lastUser": {
"name": "Douglas Campbell",
"email": "douglas.campbell@company.com"
},
"lastLogin": "2022-10-10T08:49:28.0000000",
"publicIp": "203.0.113.42",
"privateIp": "198.51.100.17",
"macAddress": "02:00:5E:00:53:01",
"securityTools": [
{
"name": "Automox",
"redAlerts": 0,
"amberAlerts": 1
},
{
"name": "Bitdefender",
"redAlerts": 0,
"amberAlerts": 0
},
{
"name": "Cisco Umbrella",
"redAlerts": 0,
"amberAlerts": 1
}
],
"connectedSystems": [
{
"name": "Tenable IO",
"isConnected": true,
"isActive": true
},
{
"name": "Azure AD",
"isConnected": true,
"isActive": true
},
{
"name": "Teamviewer",
"isConnected": true,
"isActive": true
}
]
}
],
"success": true,
"statusCode": 200,
"message": "Successfully retrieved devices."
}
Core Endpoints
Get Devices
Access all your data related to your environment’s devices
GET
/
public-api
/
v1
/
devices
curl --location 'https://your-cloud-id.threataware.com/public-api/v1/devices?filter=active&limit=10' \
--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
}
params = {
"filter": "active",
"limit": 10
}
response = requests.get(f"{BASE_URL}/devices", headers=headers, params=params)
devices = response.json()
print(f"Retrieved {len(devices['data'])} active devices")
# Example: Find Windows devices
windows_devices = [d for d in devices['data'] if d['os'] == 'Windows']
print(f"Windows devices: {len(windows_devices)}")
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}/devices`, {
headers: {
'Accept': 'application/json',
'X-ThreatAware-ApiKey': API_KEY
},
params: {
filter: 'active',
limit: 10
}
})
.then(response => {
console.log(`Retrieved ${response.data.data.length} active devices`);
// Example: Filter by OS
const macDevices = response.data.data.filter(d => d.os === 'macOS');
console.log(`macOS devices: ${macDevices.length}`);
});
$ApiKey = "your-api-key-here"
$CloudId = "sandbox"
$BaseUrl = "https://$CloudId.threataware.com/public-api/v1"
$Headers = @{
"Accept" = "application/json"
"X-ThreatAware-ApiKey" = $ApiKey
}
$Params = @{
filter = "active"
limit = 10
}
$Response = Invoke-RestMethod -Uri "$BaseUrl/devices" -Headers $Headers -Body $Params -Method Get
Write-Host "Retrieved $($Response.data.Count) active devices"
# Example: Group by OS
$Response.data | Group-Object -Property os | Format-Table Name, Count
{
"offset": 0,
"limit": 1,
"total": 100,
"data": [
{
"hostName": "LAPTOP-001-FJ23Y",
"os": "Windows",
"osVersion": "Windows 11",
"lastOnline": "2022-10-10T08:49:28.0000000",
"location": {
"countryCode": "gb",
"country": "United Kingdom",
"city": "London"
},
"tags": [],
"metadata": {
"warranty_expiry": "2022-10-10 08:33:18",
"serial_number": "F11929BD2CF8",
"total_disk_storage": "230 GB",
"free_disk_storage": "31 GB",
"total_memory": "32 GB",
"cpu_speed": "2.91 GHz",
"model": "XPS 13",
"manufacturer": "Dell"
},
"lastUser": {
"name": "Douglas Campbell",
"email": "douglas.campbell@company.com"
},
"lastLogin": "2022-10-10T08:49:28.0000000",
"publicIp": "203.0.113.42",
"privateIp": "198.51.100.17",
"macAddress": "02:00:5E:00:53:01",
"securityTools": [
{
"name": "Automox",
"redAlerts": 0,
"amberAlerts": 1
},
{
"name": "Bitdefender",
"redAlerts": 0,
"amberAlerts": 0
},
{
"name": "Cisco Umbrella",
"redAlerts": 0,
"amberAlerts": 1
}
],
"connectedSystems": [
{
"name": "Tenable IO",
"isConnected": true,
"isActive": true
},
{
"name": "Azure AD",
"isConnected": true,
"isActive": true
},
{
"name": "Teamviewer",
"isConnected": true,
"isActive": true
}
]
}
],
"success": true,
"statusCode": 200,
"message": "Successfully retrieved devices."
}
Overview
The Devices endpoint provides access to ThreatAware’s unified device inventory, aggregating data from all connected integrations. This is the primary endpoint for device information.Parameters
string
required
Filter devices based on their current stateOptions:
active- Devices online within threshold (default 30 days)inactive- Devices offline longer than thresholdall- All devices regardless of state
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 devices available
boolean
Whether the request was successful
number
HTTP status code
string
Status message
array
Show Device Object
Show Device Object
string
Device hostname
string
Operating system (Windows, macOS, Linux, iOS, Android)
string
Operating system version
string
Timestamp device was last seen online (ISO 8601)
array
Tags assigned to this device
object
object
Last user to log into this device
string
Timestamp of last user login
string
Public IP address
string
Private IP address
string
MAC address
array
Security controls deployed on this device with alert counts
array
Integrations where this device is present
curl --location 'https://your-cloud-id.threataware.com/public-api/v1/devices?filter=active&limit=10' \
--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
}
params = {
"filter": "active",
"limit": 10
}
response = requests.get(f"{BASE_URL}/devices", headers=headers, params=params)
devices = response.json()
print(f"Retrieved {len(devices['data'])} active devices")
# Example: Find Windows devices
windows_devices = [d for d in devices['data'] if d['os'] == 'Windows']
print(f"Windows devices: {len(windows_devices)}")
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}/devices`, {
headers: {
'Accept': 'application/json',
'X-ThreatAware-ApiKey': API_KEY
},
params: {
filter: 'active',
limit: 10
}
})
.then(response => {
console.log(`Retrieved ${response.data.data.length} active devices`);
// Example: Filter by OS
const macDevices = response.data.data.filter(d => d.os === 'macOS');
console.log(`macOS devices: ${macDevices.length}`);
});
$ApiKey = "your-api-key-here"
$CloudId = "sandbox"
$BaseUrl = "https://$CloudId.threataware.com/public-api/v1"
$Headers = @{
"Accept" = "application/json"
"X-ThreatAware-ApiKey" = $ApiKey
}
$Params = @{
filter = "active"
limit = 10
}
$Response = Invoke-RestMethod -Uri "$BaseUrl/devices" -Headers $Headers -Body $Params -Method Get
Write-Host "Retrieved $($Response.data.Count) active devices"
# Example: Group by OS
$Response.data | Group-Object -Property os | Format-Table Name, Count
{
"offset": 0,
"limit": 1,
"total": 100,
"data": [
{
"hostName": "LAPTOP-001-FJ23Y",
"os": "Windows",
"osVersion": "Windows 11",
"lastOnline": "2022-10-10T08:49:28.0000000",
"location": {
"countryCode": "gb",
"country": "United Kingdom",
"city": "London"
},
"tags": [],
"metadata": {
"warranty_expiry": "2022-10-10 08:33:18",
"serial_number": "F11929BD2CF8",
"total_disk_storage": "230 GB",
"free_disk_storage": "31 GB",
"total_memory": "32 GB",
"cpu_speed": "2.91 GHz",
"model": "XPS 13",
"manufacturer": "Dell"
},
"lastUser": {
"name": "Douglas Campbell",
"email": "douglas.campbell@company.com"
},
"lastLogin": "2022-10-10T08:49:28.0000000",
"publicIp": "203.0.113.42",
"privateIp": "198.51.100.17",
"macAddress": "02:00:5E:00:53:01",
"securityTools": [
{
"name": "Automox",
"redAlerts": 0,
"amberAlerts": 1
},
{
"name": "Bitdefender",
"redAlerts": 0,
"amberAlerts": 0
},
{
"name": "Cisco Umbrella",
"redAlerts": 0,
"amberAlerts": 1
}
],
"connectedSystems": [
{
"name": "Tenable IO",
"isConnected": true,
"isActive": true
},
{
"name": "Azure AD",
"isConnected": true,
"isActive": true
},
{
"name": "Teamviewer",
"isConnected": true,
"isActive": true
}
]
}
],
"success": true,
"statusCode": 200,
"message": "Successfully retrieved devices."
}
Use Cases
CMDB Synchronization
Export device inventory to ServiceNow, Jira, or other CMDBs
Security Dashboards
Build Power BI, Tableau, or custom dashboards from device data
Asset Management
Track hardware lifecycle, warranty status, and replacement planning
Compliance Reporting
Generate device compliance reports for audits and certifications
Related Endpoints
Vitals
Get security control health status for devices