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
groupId
optional
integer
Filter based on membership to a specific Server Group ID
o
required
integer
Organization ID. Response will include devices for the specified Automox Organization
pending
optional
boolean
Filter based on status of pending patches. Format: pending=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
boolean
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
managed
optional
boolean
Filter based on device's Managed status. Unmanaged indicates no linked policies. Format: managed=0
l
required
integer
Page Length. The maximum number of Devices to include in the response. Use in conjunction with Page Number.
p
required
integer
Page number. Which page of the result set to return, starting with 0. Use in conjunction with Page Length.
Response
200: OK
Devices successfully retrieved.
{
"type": "array",
"items": {
"type": "object",
"properties": {
"size": {
"type": "integer",
"format": "int64"
},
"results": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"create_time": {
"type": "string",
"format": "date-time"
},
"deleted": {
"type": "boolean"
},
"detail": {
"type": "object",
"properties": {
"CPU": {
"type": "string"
},
"DISKS": {
"type": "array",
"items": {
"type": "object",
"properties": {
"SIZE": {
"type": "string"
},
"TYPE": {
"type": "string"
}
}
}
},
"MODEL": {
"type": "string"
},
"NICS": {
"type": "array",
"items": {
"type": "object",
"properties": {
"CONNECTED": {
"type": "boolean"
},
"DEVICE": {
"type": "string"
},
"IPS": {
"type": "array",
"items": {
"type": "string"
}
},
"MAC": {
"type": "string"
},
"TYPE": {
"type": "string"
},
"VENDOR": {
"type": "string"
}
}
}
},
"RAM": {
"type": "string"
},
"SERIAL": {
"type": "string"
},
"SERVICETAG": {
"type": "string"
},
"VENDOR": {
"type": "string"
},
"VERSION": {
"type": "string"
}
}
},
"instance_id": {
"type": "string"
},
"ip_addrs": {
"type": "array",
"items": {
"type": "string"
}
},
"last_checkin_time": {
"type": "string",
"format": "date-time"
},
"last_refresh_time": {
"type": "string",
"format": "date-time"
},
"last_update_time": {
"type": "string",
"format": "date-time"
},
"name": {
"type": "string"
},
"needs_reboot": {
"type": "boolean"
},
"organization_id": {
"type": "integer",
"format": "int64"
},
"os_family": {
"type": "string"
},
"os_name": {
"type": "string"
},
"os_version_id": {
"type": "integer",
"format": "int64"
},
"patches": {
"type": "integer",
"format": "int64"
},
"refresh_interval": {
"type": "integer",
"format": "int64"
},
"server_group_id": {
"type": "integer",
"format": "int64"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"timezone": {
"type": "string"
},
"uptime": {
"type": "integer",
"format": "int64"
},
"uuid": {
"type": "string"
},
"status": {
"device_status": {
"type": "string"
},
"agent_status": {
"type": "string"
},
"policy_status": {
"type": "string"
},
"policy_statuses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "int64"
},
"compliant": {
"type": "boolean"
}
}
}
}
}
}
404: Not Found
Could not find server objects matching this query.
{
"message": "No match."
}

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&l=600&p=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","l":"600","p":"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&l=600&p=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&l=600&p=0"
$response = (Invoke-WebRequest -Method Get -Uri $url -Headers $headers).Content