API reference
Devices
Inventory, enrollment, policy, compliance, security state, connectivity and status of your managed Android, Apple (iOS, iPadOS, macOS, tvOS) and Windows devices.
A device is any phone, tablet, computer or other hardware managed in your WeGuard account. This includes devices whose enrollment is pending and devices that were unenrolled (see enrollment.status). Common attributes are normalized across platforms and always present. When a platform does not report one, its value is null. Platform-specific attributes are in details.
Windows Update compliance, hardware health and disk encryption are not part of the device object, so device lists stay fast. Call Retrieve a device’s status to read them for one device. The status also gives the battery as a percentage on every platform, while details.batteryLevel keeps the form each platform reports.
For the apps on a device, its past positions and how it is used, see Installed apps, Location history and Screen time and app usage.
The device object
idstring- Unique device id.
objectstring- Always
device. platformstring- Device platform.
ioscovers iPhone, iPad and iPod touch. Macs aremacosand Apple TVs aretvos.One ofandroidiosmacostvoswindows namestring- Display name of the device. WeGuard uses the first of these that is set: the name an admin assigned in the console, the name the device reports, its model (Android and Apple), or the device’s identifier. On Windows the order is the device name, the DNS computer name, then the device identifier.
modelstringnullable- Model as reported by the device, for example
SM-T505. manufacturerstringnullable- Manufacturer as reported by the device, for example
samsung. AlwaysApplefor Apple devices. osVersionstringnullable- Operating system version. On Windows it can lag behind an in-place upgrade. For the current Windows build, see
updates.osBuildin the device status. serialNumberstringnullable- Hardware serial number.
imeistringnullable- IMEI of devices with a cellular modem. Always
nullon Windows. phoneNumberstringnullable- Phone number of the SIM, when known. On Windows, the number the device reads from its SIM, so
nullon devices without one. agentVersionstringnullable- Version of the WeGuard agent on the device. Reported by Android and Windows devices. Always
nullon Apple devices. policyobjectnullable- The policy assigned to the device, or
nullif it has none. For the full policy, call Retrieve a policy. policy.idstring- Policy id.
policy.namestringnullable- Policy name.
enrollmentobject- Enrollment state of the device.
enrollment.statusstring- Enrollment status.
pendingmeans the device record exists but enrollment has not completed.One ofenrolledpendingunenrolled enrollment.enrolledAttimestampnullable- When the device enrolled. On Windows, when WeGuard created the device record, which is the date the console shows.
nullwhen unknown. stateobject- Security-relevant flags.
state.lostbooleantruewhen lost or stolen mode is on. Alwaysfalseon Windows, which has no lost mode.state.compromisedbooleannullabletruewhen root or a jailbreak was detected on the device.nullwhen the device has not reported it. Alwaysnullon Windows.state.lockedbooleannullabletruewhen an admin locked the device. Android only.nullon other platforms or when not reported.complianceobject- Result of the last compliance evaluation. Only Android devices are evaluated today.
compliance.policyCompliantbooleannullabletruewhen the device complies with its policy.nullwhen not evaluated.compliance.appsCompliantbooleannullabletruewhen all apps required by the policy are installed.nullwhen not evaluated.tagsobject- Values of the console tag slots
tag1totag9, for example{"tag1": "Dock 4"}. Empty slots are omitted, so the object can be empty. For the name your account gave each slot, such as "Region" fortag6, readtagLabelson the account. lastSeenAttimestampnullable- When the device last contacted WeGuard, on any channel. On Windows that is the agent’s sync (about once a minute), an MDM session, a health or location report, or an answer to a check from the console. The value does not tell these apart.
nullwhen the device has never checked in. connectivityobject- Whether the device checked in recently. WeGuard works it out from
lastSeenAtwhen it builds the response, with the same rule on every platform. connectivity.statusstringonlinewhenlastSeenAtis at mostthresholdMinutesold,offlinewhen it is older, andunknownwhen the device has never checked in (lastSeenAtisnull). AlastSeenAtin the future, caused by clock skew, counts asonline.One ofonlineofflineunknownconnectivity.thresholdMinutesinteger- Minutes after
lastSeenAtat which the device counts as offline. Currently1440(24 hours). Read it from the response instead of hard-coding it. createdAttimestamp- When the device record was created.
{
"id": "6523f1c2a7b9d40012345678",
"object": "device",
"platform": "android",
"name": "Warehouse Scanner 12",
"model": "SM-T505",
"manufacturer": "samsung",
"osVersion": "13",
"serialNumber": "R9JN30ABCDE",
"imei": "356938035643809",
"phoneNumber": null,
"agentVersion": "6.4.2",
"policy": {
"id": "64ff0a1b2c3d4e5f60718293",
"name": "Kiosk: Scanners"
},
"enrollment": {
"status": "enrolled",
"enrolledAt": "2026-03-14T08:12:44Z"
},
"state": {
"lost": false,
"compromised": false,
"locked": false
},
"compliance": {
"policyCompliant": true,
"appsCompliant": false
},
"tags": {
"tag1": "Dock 4",
"tag3": "Night shift"
},
"lastSeenAt": "2026-10-07T09:29:51Z",
"connectivity": {
"status": "online",
"thresholdMinutes": 1440
},
"createdAt": "2026-03-14T08:10:02Z",
"details": {
"deviceIdType": "IMEI",
"suspended": false,
"wiped": false,
"enterpriseEnrolled": true,
"appliedPolicyVersion": 42,
"mobileDataUsageBytes": 1288490188,
"wifiDataUsageBytes": 9663676416,
"batteryLevel": 87
}
}Android details
details when platform is android.
deviceIdTypestringnullable- Kind of hardware identifier the agent reported as the device id.
suspendedbooleantruewhen the device is suspended.wipedbooleantruewhen the device has been wiped.enterpriseEnrolledbooleantruewhen the device is enrolled with Android Enterprise.appliedPolicyVersionintegernullable- Version of the policy last applied on the device.
mobileDataUsageBytesintegernullable- Mobile data used, in bytes, as reported by the agent.
wifiDataUsageBytesintegernullable- Wi-Fi data used, in bytes, as reported by the agent.
batteryLevelintegernullable- Battery level in percent, exactly as the agent reports it. Not range-checked. The device status
batteryleaves out a value outside 0 to 100.
Apple details
details when platform is ios, macos or tvos. Capacity and battery values are strings exactly as reported by the device.
udidstringnullable- Apple unique device identifier.
supervisedbooleantruewhen the device is supervised.modelNamestringnullable- Model name, for example
iPad. productNamestringnullable- Product identifier, for example
iPad13,18. buildVersionstringnullable- OS build number.
deviceCapacitystringnullable- Total storage capacity as reported by the device.
availableDeviceCapacitystringnullable- Available storage as reported by the device.
batteryLevelstringnullable- Battery level as the device reports it: a fraction from 0 to 1, as a string, for example
"0.85". The device statusbattery.levelgives it as a percentage. wifiMacstringnullable- Wi-Fi MAC address.
bluetoothMacstringnullable- Bluetooth MAC address.
iccidstringnullable- ICCID of the SIM card.
carrierstringnullable- Current carrier network.
roamingbooleantruewhen the device is roaming.deviceFamilystringnullable- Device family, for example
iPad.
{
"details": {
"udid": "00008103-001A2B3C4D5E6F70",
"supervised": true,
"modelName": "iPad",
"productName": "iPad13,18",
"buildVersion": "22A3354",
"deviceCapacity": "64.0",
"availableDeviceCapacity": "41.7",
"batteryLevel": "0.85",
"wifiMac": "a4:83:e7:12:34:56",
"bluetoothMac": "a4:83:e7:12:34:57",
"iccid": null,
"carrier": null,
"roaming": false,
"deviceFamily": "iPad"
}
}Windows details
details when platform is windows. Inventory values such as storage and memory are strings, exactly as the device reports them.
deviceIdstringnullable- Windows device identifier the device registered with WeGuard.
hardwareDeviceIdstringnullable- Hardware identifier the device reports.
osEditionstringnullable- Windows edition, as the numeric edition id the device reports, for example
48(Pro),4(Enterprise),121(Education) or101(Home). dnsComputerNamestringnullable- DNS computer name.
processorArchitecturestringnullable- Processor architecture as the device reports it, usually the numeric Windows value:
9(x64),12(ARM64) or0(x86). Devices managed only through the WeGuard agent do not report it. totalStoragestringnullable- Size of the first internal drive in mebibytes (MiB), as a decimal string, for example
"242935"(about 237 GiB). For every drive and its free space in bytes, see device status. totalRamstringnullable- Installed memory in mebibytes (MiB), as a decimal string, for example
"16384"(16 GiB). wlanMacAddressstringnullable- Wireless LAN MAC address, for example
3C-22-FB-12-34-56. wlanIpv4Addressstringnullable- Wireless LAN IPv4 address.
weshieldInstalledbooleantruewhen WeShield is installed.weshieldVersionstringnullable- Installed WeShield version.
wesupportVersionstringnullable- Installed WeSupport version.
weguardRmmVersionstringnullable- Installed WeGuard RMM version.
batteryLevelintegernullable- Battery charge in percent, from 0 to 100.
nullwhen the device has not reported a level or has no battery. Desktops and virtual machines report no battery. batteryChargingbooleannullabletruewhen the device is on external power, whether or not the battery is still charging.nullwhenbatteryLevelisnull.batteryReportedAttimestampnullable- When the device last reported its battery level.
nullwhenbatteryLevelisnull. managementModestringnullable- How WeGuard manages the device.
mdm: through Windows MDM (OMA-DM). Devices enrolled before agent mode existed are allmdm.agent: only through the WeGuard agent, for example on Windows Home.nullwhen the device record is incomplete.One ofmdmagent enrollmentTypestringnullable- How the device enrolled.
enrollment_code: from Windows Settings with a WeGuard enrollment code address.entra_id: through Microsoft Entra ID, including Entra join and Windows Autopilot.provisioning_package: bulk enrollment with a provisioning package.agent: registered by the WeGuard agent without MDM. WeGuard records the value at enrollment. For devices that enrolled before WeGuard recorded it, the value was filled in later from other enrollment data and can be wrong.nullwhen no value was recorded.One ofenrollment_codeentra_idprovisioning_packageagent lastMdmSessionAttimestampnullable- When the device last had an MDM session with WeGuard. For
agentdevices, when the agent last checked for commands. kioskStatusstringnullable- Where kiosk delivery stands. It describes what WeGuard sent, not what the device did.
none: WeGuard currently sends no kiosk configuration. The policy has no kiosk, the kiosk is paused or was removed, WeGuard cannot build one for the device yet, or a configuration waits to be sent again.sent: WeGuard queued or delivered a kiosk configuration and the device has not rejected it. This does not confirm that the device applied it: an offline device readssenttoo, and while the agent removes an agent-enforced kiosk, the value stayssentuntil the agent reports the removal done.rejected: the device rejected the current configuration 3 times in a row, and WeGuard stopped sending it until the kiosk policy changes.nullwhen the device record is incomplete.One ofnonesentrejected kioskPausedbooleannullabletruewhile kiosk maintenance mode is on: the kiosk is taken down on the device while the policy keeps it.falsewhen never set.nullwhen the device record is incomplete.kioskLastVerifiedAttimestampnullable- When the device last confirmed that it holds a kiosk configuration: a read-back that matched what WeGuard sent (MDM-enforced kiosks) or the agent’s completion report (agent-enforced kiosks). WeGuard does not reset it when it sends a new configuration or removes the kiosk, so it can belong to an earlier configuration.
nullwhen the device has never confirmed one.
{
"details": {
"deviceId": "A4C123B1612DD272D1371C17149D4395",
"hardwareDeviceId": "36B3216FDAEEB975729FAE923D5A4FD12AABFE228F219E9CB0EB53F16947CCF2",
"osEdition": "48",
"dnsComputerName": "FRONTDESK-07",
"processorArchitecture": "9",
"totalStorage": "242935",
"totalRam": "24576",
"wlanMacAddress": "3C-22-FB-12-34-56",
"wlanIpv4Address": "10.20.4.117",
"weshieldInstalled": true,
"weshieldVersion": "2.3.1",
"wesupportVersion": "1.8.0",
"weguardRmmVersion": "1.2.4",
"batteryLevel": 87,
"batteryCharging": true,
"batteryReportedAt": "2026-10-07T09:29:51Z",
"managementMode": "mdm",
"enrollmentType": "entra_id",
"lastMdmSessionAt": "2026-10-07T09:12:30Z",
"kioskStatus": "none",
"kioskPaused": false,
"kioskLastVerifiedAt": null
}
}The device status object
Operational status of one device. Sections the platform does not report are null. Today updates, hardware, encryption and secureBoot are reported by Windows devices only. Antivirus, firewall and lock state are not reported.
objectstring- Always
device_status. deviceIdstring- Id of the device.
platformstring- Platform of the device.One of
androidiosmacostvoswindows lastSeenAttimestampnullable- When the device last contacted WeGuard. Always the same value as
lastSeenAton the device object. connectivityobject- Whether the device checked in recently. WeGuard works it out from
lastSeenAtwhen it builds the response, with the same rule on every platform. Always the same value asconnectivityon the device object. connectivity.statusstringonlinewhenlastSeenAtis at mostthresholdMinutesold,offlinewhen it is older, andunknownwhen the device has never checked in (lastSeenAtisnull). AlastSeenAtin the future, caused by clock skew, counts asonline.One ofonlineofflineunknownconnectivity.thresholdMinutesinteger- Minutes after
lastSeenAtat which the device counts as offline. Currently1440(24 hours). Read it from the response instead of hard-coding it. batteryobjectnullable- The device’s last battery report.
nullwhen the device has not reported a level or has no battery, such as a Windows desktop or virtual machine. On Windows it matchesbatteryLevel,batteryChargingandbatteryReportedAtin Windows details. On Apple devices,details.batteryLevelstays the fraction the device reports, such as"0.56", whilelevelis the percentage,56. On Android,details.batteryLevelis passed through as reported, whilebatteryisnullfor a value outside 0 to 100. battery.levelinteger- Charge in percent, from 0 to 100.
battery.chargingbooleannullabletruewhen the device is on external power, whether or not the battery is still charging. Windows only.nullon other platforms.battery.reportedAttimestampnullable- When WeGuard last received the level.
nullon Apple devices, which do not record it. updatesobjectnullable- Windows Update compliance, as computed by WeGuard patch management.
nullunless patch management has produced data for the device, which needs patch management turned on for both the account and the device’s policy. If the account later turns patch management off, the data stays available with the state last computed. updates.complianceStatestringstale: the last scan is 7 or more days old. WeGuard checks this when it builds the response, whatever state it stored.unknown: the device has not scanned yet, or its last scan failed.non_compliant: a critical or important update that is missing or failed was released more than the account’s service level ago (14 days unless configured), or a restart has been pending for 7 or more days. For an update without a release date, WeGuard counts from when it first detected the update.compliant: none of the above. Apart fromstale, this is the state WeGuard last computed: on every scan the device uploads, and every hour while the account has patch management on.One ofcompliantnon_compliantstaleunknownupdates.missingCriticalCountinteger- Applicable critical updates that are not installed.
updates.missingImportantCountinteger- Applicable important updates that are not installed.
updates.missingOtherCountinteger- Other applicable updates that are not installed.
updates.failedCountinteger- Updates whose installation failed.
updates.pendingRebootCountinteger- Installed updates that wait for a restart.
updates.pendingRebootSincetimestampnullable- Since when a restart has been pending.
nullwhen none is. updates.lastScanAttimestampnullable- When the device last scanned for updates.
updates.osBuildstringnullable- Windows build and update revision from the last scan, for example
26200.9445. The agent scans about every 22 hours, so this is usually more current thanosVersionon the device object. updates.osDisplayVersionstringnullable- Windows feature release from the last scan, for example
25H2. hardwareobjectnullable- The newest hardware health sample, as the device reported it. WeGuard does not verify these values. The WeGuard agent takes a sample every 15 minutes by default while the device’s policy has health checks turned on.
nullwhen the device sent no sample in the last 60 days, which is how long samples are kept. hardware.sampledAttimestamp- When the device took the sample, by the device’s own clock. WeGuard ignores samples dated more than 5 minutes ahead of its own clock.
hardware.cpuUtilizationPercentnumbernullable- Total CPU use in percent, from 0 to 100.
hardware.memoryobject- Physical memory. The device reports it in steps of 0.1 GiB, which WeGuard converts to bytes.
hardware.memory.totalBytesintegernullable- Installed memory, in bytes.
hardware.memory.availableBytesintegernullable- Memory available for use, in bytes.
hardware.drivesarray of objects- Volumes with a drive letter, in the order the device reported them. The device reports sizes in whole GiB, rounded down, which WeGuard converts to bytes.
hardware.drives.namestring- Drive letter, for example
C:. hardware.drives.typestringnullable- Kind of volume.
nullwhen the device reported no type it could classify.One offixedremovablenetworkoptical hardware.drives.totalBytesintegernullable- Size of the volume, in bytes.
hardware.drives.freeBytesintegernullable- Free space, in bytes. A removable drive without media reports
0. encryptionobjectnullable- BitLocker and TPM state as the WeGuard agent last reported it. WeGuard does not verify these values. The agent reports them only for devices whose policy configures BitLocker.
nullwhen the agent has never reported them. Recovery keys and key protectors are never returned. encryption.reportedAttimestamp- When the device last reported a change. The agent reports on change and after each restart, so this time does not tell you how current the data is. WeGuard ignores reports dated more than 5 minutes in the future.
encryption.drivesarray of objects- BitLocker state of each volume. A value the device did not report, or that WeGuard does not recognize, reads
unknown. encryption.drives.mountPointstring- Drive letter, for example
C:. encryption.drives.protectionStatusstring- Whether BitLocker protection is on.One of
onoffunknown encryption.drives.encryptionStatusstring- Encryption state of the volume.One of
fully_decryptedfully_encryptedencryption_in_progressdecryption_in_progressencryption_pauseddecryption_pausedunknown encryption.drives.encryptionPercentageintegernullable- Share of the volume that is encrypted, in percent.
nullwhen the device did not report it. encryption.drives.lockStatusstring- Whether the volume is locked.One of
lockedunlockedunknown encryption.tpmobjectnullable- The Trusted Platform Module.
nullwhen the report included no TPM data. encryption.tpm.presentbooleanfalsewhen the agent found no TPM. The other members are thennull.encryption.tpm.enabledbooleannullable- Whether the TPM is enabled.
encryption.tpm.activatedbooleannullable- Whether the TPM is activated.
encryption.tpm.specVersionstringnullable- Version of the TPM specification the chip implements, for example
2.0or1.2. secureBootbooleannullabletruewhen UEFI Secure Boot is on. Only Windows 10 devices that run the WeGuard agent with patch management on report it, as part of the Windows 11 readiness check.nullotherwise.
The device location object
The last location a device reported, in WGS 84 decimal degrees.
objectstring- Always
device_location. deviceIdstring- Id of the device.
latitudenumber- Latitude in decimal degrees.
longitudenumber- Longitude in decimal degrees.
accuracyMetersnumbernullable- Horizontal accuracy radius in meters. Reported by Apple devices.
nullon Android and Windows, or when not reported. recordedAttimestampnullable- When the device captured the location.
{
"object": "device_location",
"deviceId": "6523f1c2a7b9d40012345679",
"latitude": 17.4474,
"longitude": 78.3762,
"accuracyMeters": 12.5,
"recordedAt": "2026-10-07T09:20:00Z"
}List devices
/ v1/ devicesReturns the devices in your account, ordered by id (creation order), as a paginated list.
Query parameters
platformstringoptionaldefault all platforms- Only return items for these platforms. Pass a comma-separated list, for example
android,ios. Values are case-insensitive.ioscovers iPhone, iPad and iPod touch.One or more ofandroidiosmacostvoswindows policyIdstringoptional- Only return devices assigned to this policy. Case-insensitive. A well-formed id that matches no policy returns an empty list.
limitintegeroptionaldefault 25- Maximum number of items to return, from
1to100. cursorstringoptional- The
nextCursorfrom the previous page. Send it unchanged, together with the same filters. See Pagination. includeTotalbooleanoptionaldefault false- Set to
trueto also returntotalCount. It runs an extra count, so request it only when you need it.
Example request
curl "https://api-gw.weguard.ai/core/v1/devices?platform=android&limit=1" \
-H "Authorization: Bearer $WEGUARD_API_KEY"const response = await fetch("https://api-gw.weguard.ai/core/v1/devices?platform=android&limit=1", {
headers: { Authorization: `Bearer ${process.env.WEGUARD_API_KEY}` },
});
const body = await response.json();
if (!response.ok) {
throw new Error(`${body.code}: ${body.detail} (requestId ${body.requestId})`);
}
console.log(body);import os
import requests
response = requests.get(
"https://api-gw.weguard.ai/core/v1/devices",
params={"platform": "android", "limit": 1},
headers={"Authorization": f"Bearer {os.environ['WEGUARD_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())Response
A list object whose data holds device objects.
{
"object": "list",
"data": [
{
"id": "6523f1c2a7b9d40012345678",
"object": "device",
"platform": "android",
"name": "Warehouse Scanner 12",
"model": "SM-T505",
"manufacturer": "samsung",
"osVersion": "13",
"serialNumber": "R9JN30ABCDE",
"imei": "356938035643809",
"phoneNumber": null,
"agentVersion": "6.4.2",
"policy": {
"id": "64ff0a1b2c3d4e5f60718293",
"name": "Kiosk: Scanners"
},
"enrollment": {
"status": "enrolled",
"enrolledAt": "2026-03-14T08:12:44Z"
},
"state": {
"lost": false,
"compromised": false,
"locked": false
},
"compliance": {
"policyCompliant": true,
"appsCompliant": false
},
"tags": {
"tag1": "Dock 4",
"tag3": "Night shift"
},
"lastSeenAt": "2026-10-07T09:29:51Z",
"connectivity": {
"status": "online",
"thresholdMinutes": 1440
},
"createdAt": "2026-03-14T08:10:02Z",
"details": {
"deviceIdType": "IMEI",
"suspended": false,
"wiped": false,
"enterpriseEnrolled": true,
"appliedPolicyVersion": 42,
"mobileDataUsageBytes": 1288490188,
"wifiDataUsageBytes": 9663676416,
"batteryLevel": 87
}
}
],
"hasMore": true,
"nextCursor": "YzE6NjUyM2YxYzJhN2I5ZDQwMDEyMzQ1Njc4"
}Errors
platformhas an unsupported value,policyIdis malformed,limitorincludeTotalis invalid, or a parameter was sent twice.The request includes a query parameter this endpoint does not accept.
The cursor is malformed or was issued for different filters.
The key lacks
devices:read.
Retrieve a device
/ v1/ devices/ {deviceId}Returns a single device by id.
Path parameters
deviceIdstringrequired- Id of the device. Case-insensitive.
Example request
curl https://api-gw.weguard.ai/core/v1/devices/6523f1c2a7b9d40012345678 \
-H "Authorization: Bearer $WEGUARD_API_KEY"const response = await fetch("https://api-gw.weguard.ai/core/v1/devices/6523f1c2a7b9d40012345678", {
headers: { Authorization: `Bearer ${process.env.WEGUARD_API_KEY}` },
});
const body = await response.json();
if (!response.ok) {
throw new Error(`${body.code}: ${body.detail} (requestId ${body.requestId})`);
}
console.log(body);import os
import requests
response = requests.get(
"https://api-gw.weguard.ai/core/v1/devices/6523f1c2a7b9d40012345678",
headers={"Authorization": f"Bearer {os.environ['WEGUARD_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())Response
Returns a device object.
{
"id": "6523f1c2a7b9d40012345678",
"object": "device",
"platform": "android",
"name": "Warehouse Scanner 12",
"model": "SM-T505",
"manufacturer": "samsung",
"osVersion": "13",
"serialNumber": "R9JN30ABCDE",
"imei": "356938035643809",
"phoneNumber": null,
"agentVersion": "6.4.2",
"policy": {
"id": "64ff0a1b2c3d4e5f60718293",
"name": "Kiosk: Scanners"
},
"enrollment": {
"status": "enrolled",
"enrolledAt": "2026-03-14T08:12:44Z"
},
"state": {
"lost": false,
"compromised": false,
"locked": false
},
"compliance": {
"policyCompliant": true,
"appsCompliant": false
},
"tags": {
"tag1": "Dock 4",
"tag3": "Night shift"
},
"lastSeenAt": "2026-10-07T09:29:51Z",
"connectivity": {
"status": "online",
"thresholdMinutes": 1440
},
"createdAt": "2026-03-14T08:10:02Z",
"details": {
"deviceIdType": "IMEI",
"suspended": false,
"wiped": false,
"enterpriseEnrolled": true,
"appliedPolicyVersion": 42,
"mobileDataUsageBytes": 1288490188,
"wifiDataUsageBytes": 9663676416,
"batteryLevel": 87
}
}Errors
No device with this id exists in your account.
The request includes a query parameter. This endpoint takes none.
The key lacks
devices:read.
Retrieve a device’s status
/ v1/ devices/ {deviceId}/ statusReturns the operational status of a device: connectivity and battery, and for Windows devices also Windows Update compliance, the latest hardware health sample, BitLocker and TPM state, and Secure Boot. The API reads what WeGuard has stored and does not contact the device.
The hardware and encryption sections are reported by the device and not verified by WeGuard. Use them for inventory and monitoring, not as proof of compliance.
Path parameters
deviceIdstringrequired- Id of the device. Case-insensitive.
Example request
curl https://api-gw.weguard.ai/core/v1/devices/6523f1c2a7b9d4001234567a/status \
-H "Authorization: Bearer $WEGUARD_API_KEY"const response = await fetch("https://api-gw.weguard.ai/core/v1/devices/6523f1c2a7b9d4001234567a/status", {
headers: { Authorization: `Bearer ${process.env.WEGUARD_API_KEY}` },
});
const body = await response.json();
if (!response.ok) {
throw new Error(`${body.code}: ${body.detail} (requestId ${body.requestId})`);
}
console.log(body);import os
import requests
response = requests.get(
"https://api-gw.weguard.ai/core/v1/devices/6523f1c2a7b9d4001234567a/status",
headers={"Authorization": f"Bearer {os.environ['WEGUARD_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())Response
Returns a device status object.
{
"object": "device_status",
"deviceId": "6523f1c2a7b9d4001234567a",
"platform": "windows",
"lastSeenAt": "2026-10-07T09:29:51Z",
"connectivity": {
"status": "online",
"thresholdMinutes": 1440
},
"battery": {
"level": 87,
"charging": true,
"reportedAt": "2026-10-07T09:29:51Z"
},
"updates": {
"complianceState": "non_compliant",
"missingCriticalCount": 1,
"missingImportantCount": 0,
"missingOtherCount": 3,
"failedCount": 0,
"pendingRebootCount": 1,
"pendingRebootSince": "2026-09-28T06:10:00Z",
"lastScanAt": "2026-10-07T03:12:44Z",
"osBuild": "26200.9445",
"osDisplayVersion": "25H2"
},
"hardware": {
"sampledAt": "2026-10-07T09:15:00Z",
"cpuUtilizationPercent": 7,
"memory": {
"totalBytes": 25555055411,
"availableBytes": 18253611008
},
"drives": [
{
"name": "C:",
"type": "fixed",
"totalBytes": 254476812288,
"freeBytes": 179314884608
},
{
"name": "F:",
"type": "removable",
"totalBytes": 61203283968,
"freeBytes": 0
}
]
},
"encryption": {
"reportedAt": "2026-10-01T08:15:00Z",
"drives": [
{
"mountPoint": "C:",
"protectionStatus": "on",
"encryptionStatus": "fully_encrypted",
"encryptionPercentage": 100,
"lockStatus": "unlocked"
}
],
"tpm": {
"present": true,
"enabled": true,
"activated": true,
"specVersion": "2.0"
}
},
"secureBoot": null
}Errors
No device with this id exists in your account.
The request includes a query parameter. This endpoint takes none.
The key lacks
devices:read.
Retrieve a device’s location
/ v1/ devices/ {deviceId}/ locationReturns the last location the device reported. The API reads the stored location and does not ask the device for a new fix. Only locations:read is required. For earlier positions, use location history.
Locations are personal data about the people who use your devices. Grant locations:read only to integrations that need it, and handle the data according to your privacy obligations.
Path parameters
deviceIdstringrequired- Id of the device. Case-insensitive.
Example request
curl https://api-gw.weguard.ai/core/v1/devices/6523f1c2a7b9d40012345679/location \
-H "Authorization: Bearer $WEGUARD_API_KEY"const response = await fetch("https://api-gw.weguard.ai/core/v1/devices/6523f1c2a7b9d40012345679/location", {
headers: { Authorization: `Bearer ${process.env.WEGUARD_API_KEY}` },
});
const body = await response.json();
if (!response.ok) {
throw new Error(`${body.code}: ${body.detail} (requestId ${body.requestId})`);
}
console.log(body);import os
import requests
response = requests.get(
"https://api-gw.weguard.ai/core/v1/devices/6523f1c2a7b9d40012345679/location",
headers={"Authorization": f"Bearer {os.environ['WEGUARD_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())Response
Returns a device location object.
{
"object": "device_location",
"deviceId": "6523f1c2a7b9d40012345679",
"latitude": 17.4474,
"longitude": 78.3762,
"accuracyMeters": 12.5,
"recordedAt": "2026-10-07T09:20:00Z"
}Errors
No device with this id exists in your account.
The device has never reported a valid location.
The request includes a query parameter. This endpoint takes none.
The key lacks
locations:read.
Common errors
Besides the errors listed for each endpoint, any request can fail authentication, exceed the rate limit, ask for a format other than JSON, or fail with a server error. See Errors for the response format and retry guidance.
The request has no
Authorizationheader.The
Authorizationheader does not use theBearerscheme, or has no key after it. TheWWW-Authenticateheader carrieserror="invalid_request".The key is malformed, does not exist, or its secret does not match. The
WWW-Authenticateheader carrieserror="invalid_token".The key is past its
expiresAt.An account admin revoked the key. Revocation takes effect immediately and cannot be undone.
The WeGuard account that owns the key has been deleted or disabled.
The
Acceptheader excludes JSON.The key has used up its request budget. See Rate limits.
An unexpected error occurred on our side.
A service WeGuard depends on is temporarily unavailable, or reading the data took longer than the time WeGuard allows for it. This can also happen while your key is being checked, so it can be returned before authentication completes. The response carries
Retry-After.