When running in development, the graphql server (and graphiql) can be accessed at http://localhost:37370
GraphQL Query
query ValidateDevice($policy: DevicePolicy!) {
policy {
validate(policy: $policy) {
status
osVersion
firewall
diskEncryption
automaticUpdates
screenLock
remoteLogin
stethoscopeVersion
}
}
device {
deviceId
deviceName
platform
platformName
friendlyName
osVersion
osName
osBuild
firmwareVersion
hardwareModel
hardwareSerial
stethoscopeVersion
osqueryVersion
ipAddresses {
interface
address
mask
broadcast
}
macAddresses {
interface
type
mac
physicalAdapter
lastChange
}
security {
firewall
automaticUpdates
diskEncryption
screenLock
remoteLogin
automaticAppUpdates
automaticSecurityUpdates
automaticOsUpdates
}
}
}
Parameters
{
"policy": {
"stethoscopeVersion": ">=1.0.0",
"osVersion": {
"darwin": {
"ok": ">=10.13.4",
"nudge": ">=10.12.6"
},
"win32": {
"ok": ">=10.0.16299",
"nudge": ">=10.0.15063"
}
},
"firewall": "ALWAYS",
"diskEncryption": "ALWAYS",
"automaticUpdates": "SUGGESTED",
"screenLock": "IF_SUPPORTED",
"remoteLogin": "NEVER"
}
}
Response:
{
"data": {
"policy": {
"validate": {
"status": "PASS",
"osVersion": "PASS",
"firewall": "PASS",
"diskEncryption": "PASS",
"automaticUpdates": "PASS",
"screenLock": "PASS",
"remoteLogin": "PASS",
"stethoscopeVersion": "PASS"
}
},
"device": {
"deviceId": "AAAAAAA-BBBB-CCCC-1111-2222222222",
"deviceName": "nfml-Y4H",
"platform": "darwin",
"platformName": "Apple Inc.",
"friendlyName": "MacBook Pro 'Core i7' 3.1 15' Touch/Mid-2017",
"osVersion": "10.13.4",
"osName": "Mac OS X",
"osBuild": "17E199",
"firmwareVersion": "173 (B&I)",
"hardwareModel": "MacBookPro14,3 ",
"hardwareSerial": "<SERIAL>",
"stethoscopeVersion": "1.1.7",
"osqueryVersion": "2.11.2",
"ipAddresses": [
{
"interface": "lo0",
"address": "127.0.0.1",
"mask": "255.0.0.0",
"broadcast": ""
},
{
"interface": "lo0",
"address": "::1",
"mask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
"broadcast": ""
},
{
"interface": "lo0",
"address": "fe80::1",
"mask": "ffff:ffff:ffff:ffff::",
"broadcast": ""
},
{
"interface": "en0",
"address": "fe80::1000:ef7a:2000:e7e9",
"mask": "ffff:ffff:ffff:ffff::",
"broadcast": ""
}
],
"macAddresses": [
{
"interface": "en0",
"type": "6",
"mac": "ab:cd:ef:12:34:56",
"physicalAdapter": false,
"lastChange": "1523200793"
},
{
"interface": "en6",
"type": "6",
"mac": "ab:cd:ef:12:34:56",
"physicalAdapter": false,
"lastChange": "1523197723"
}
],
"security": {
"firewall": "ON",
"automaticUpdates": "ON",
"diskEncryption": "ON",
"screenLock": "OFF",
"remoteLogin": "OFF",
"automaticAppUpdates": "ON",
"automaticSecurityUpdates": "ON",
"automaticOsUpdates": "ON"
}
}
}
}