Retrieve details for all devices

This retrieves a list of all devices (server objects) for the authenticated user.

get
/servers

https://console.automox.com/api/servers
Retrieves a list of applicable devices with their associated details.
Request
Response
Request
Headers
Authorization: Bearer
required
string
Your Automox API Key for authentication Format: Authorization: Bearer your_automox_api_key
Query Parameters
o
required
integer
Organization ID. Response will include devices for the specified Automox Organization. The organization will be assumed based on the API key, if not specified.
limit
optional
integer
Limit on the number of results to be returned; between 1 and 500 with a default of 500. Use in conjunction with the page parameter. See About Automox API > Pagination.
page
optional
integer
The page of results you want to be returned with page numbers starting at 0. Use in conjunction with the limit parameter. About Automox API > Pagination.
groupId
optional
integer
Filter based on membership to a specific Server Group ID
PS_VERSION
optional
string
PowerShell version running on the device
pending
optional
boolean
Filter based on status of pending patches. Format: pending=1 Possible values: 0, 1
patchStatus
optional
string
Filter based on presence of ANY available patches that aren't already installed. Value must be 'missing' Format: patchStatus=missing
policyId
optional
integer
Filter based on association to a given Policy ID Format: policyId=12345
exception
optional
boolean
Filter based on device's Exception status Format: exception=1 Possible values: 0, 1
managed
optional
boolean
Filter based on device's Managed status. Unmanaged indicates no linked policies. Format: managed=0 Possible values: 0, 1
l
optional
integer
Deprecated, use limit. See About Automox API > Pagination.
p
optional
integer
Deprecated; use page. See About Automox API > Pagination.
Response
200: OK
Devices successfully retrieved.
[
{
"id": 123456,
"os_version_id": 4313,
"server_group_id": 18321,
"organization_id": 1234,
"uuid": "string",
"name": string",
"instance_id": "",
"refresh_interval": 1440,
"last_update_time": "2021-03-09T07:00:38+0000",
"last_refresh_time": "2021-03-14T23:16:53+0000",
"uptime": "456627",
"needs_reboot": false,
"timezone": "UTC-0600",
"tags": [
"string"
],
"deleted": false,
"create_time": "2019-11-25T18:59:02+0000",
"os_version": "11.2.3",
"os_name": "string",
"os_family": "string",
"ip_addrs": [
"string"
],
"ip_addrs_private": [
"string"
],
"patches": 2,
"detail": {
"NICS": [
{
"TYPE": "string",
"MAC": "string",
"IPS": [
"string"
],
"CONNECTED": true,
"VENDOR": "string",
"DEVICE": "en0"
}
],
"IPS": [
"string"
],
"LAST_USER_LOGON": {
"SRC": "console",
"USER": "string",
"TIME": "2021-03-10T07:17:39-0700"
},
"VERSION": "string",
"VOLUME": [
{
"IS_SYSTEM_DISK": "true",
"VOLUME": "/dev/disk1s5s1",
"FSTYPE": "APFS",
"LABEL": "Macintosh HD",
"AVAIL": "121018208256",
"FREE": "51197444096"
}
],
"WSUS_CONFIG": null,
"RAM": "string",
"AUTO_UPDATE_OPTIONS": {
"ENABLED": "0",
"OPTIONS": "Automatic Check for Updates, Download new updates when available, Install system data updates, Install system security updates"
},
"DISKS": [
{
"TYPE": "string",
"SIZE": "string"
}
],
"SERIAL": "string",
"MODEL": "string",
"VENDOR": "string",
"SERVICETAG": null,
"WMI_INTEGRITY_CHECK": null,
"CPU": "string",
"PS_VERSION": null,
"UPDATE_SOURCE_CHECK": {
"ERROR": "Succeded",
"CONNECTED": "true"
},
"FQDNS": []
},
"agent_version": "1.0-30",
"custom_name": "string",
"exception": false,
"total_count": 2,
"server_policies": [],
"policy_status": [
{
"id": 123456789,
"organization_id": 1234,
"policy_id": 13530,
"server_id": 429883,
"policy_name": "Default Patch Policy",
"policy_type_name": "patch",
"status": 2,
"result": "{}",
"create_time": "2021-03-14T23:16:53+0000",
"next_remediation": null
}
],
"last_scan_failed": false,
"pending": true,
"compliant": true,
"display_name": "string",
"commands": [],
"pending_patches": 2,
"connected": true,
"last_process_time": "2021-03-15T13:41:35+0000",
"next_patch_time": "2021-03-16T06:00:00+0000",
"notification_count": 1,
"reboot_notification_count": 0,
"patch_deferral_count": 0,
"reboot_deferral_count": 0,
"is_delayed_by_notification": true,
"reboot_is_delayed_by_notification": false,
"is_delayed_by_user": false,
"reboot_is_delayed_by_user": false,
"last_disconnect_time": null,
"needs_attention": false,
"serial_number": "string",
"last_logged_in_user": "string",
"status": {
"device_status": "ready",
"agent_status": "connected",
"policy_status": "non-compliant",
"policy_statuses": [
{
"id": 13530,
"compliant": false
}
]
}
},

Example Requests

cURL
Python http.client
Python requests
C#
PowerShell
cURL
curl -X GET \
'https://console.automox.com/api/servers?o=0000&needsAttention=1&pending=0&policyId=12345&exception=1&patchStatus=missing&managed=0&limit=500&page=0' \
-H 'Authorization: Bearer your_automox_api_key'
Python http.client
import http.client
conn = http.client.HTTPConnection("console,automox,com")
headers = {
'Authorization': "Bearer your_automox_api_key"
}
conn.request("GET", "api,servers", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Python requests
import requests
url = "https://console.automox.com/api/servers"
querystring = {"o":"0000","needsAttention":"1","pending":"0","policyId":"12345","exception":"1","patchStatus":"missing","managed":"0","limit":"500","page":"0"}
headers = {
'Authorization': "Bearer your_automox_api_key"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
C#
var client = new RestClient("https://console.automox.com/api/servers?o=0000&needsAttention=1&pending=0&policyId=12345&exception=1&patchStatus=missing&managed=0&limit=500&page=0");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer your_automox_api_key");
IRestResponse response = client.Execute(request);
PowerShell
$apiKey = 'your_automox_api_key'
$headers = @{ "Authorization" = "Bearer $apiKey" }
$url = "https://console.automox.com/api/servers?o=0000&needsAttention=1&pending=0&policyId=12345&exception=1&patchStatus=missing&managed=0&limit=500&page=0"
$response = (Invoke-WebRequest -Method Get -Uri $url -Headers $headers).Content