Objective
To explain why the next_remediation field returns a null value when querying the bulk Get Devices (GET /api/servers) API endpoint and how to properly retrieve calculated policy schedules using the single-device endpoint.
Overview
When making an Automox API request to list all devices using the GetDevices endpoint, the next_remediation field for endpoints frequently returns null. However, querying the same endpoint individually using the GetServer (GET /api/servers/{id}) endpoint successfully returns an active timestamp for next_remediation.
This behavior is expected and is tied to how Automox calculates schedule data at query time versus static database indexing.
Root Cause
Calculated vs. Stored Data: The
next_remediationfield is not stored as a static value in the main Automox device database table. Instead, it is a dynamically calculated field that evaluates active group assignments, policy schedules, timezones, and pending package requirements on the fly.Query Performance Optimization: To maintain high performance and avoid extreme latency when returning bulk lists of endpoints via
GetDevices(GET /api/servers), Automox bypasses real-time policy schedule calculations across the entire fleet, resulting in anulloutput for that specific attribute.Single Endpoint Queries: When calling
GetServer(GET /api/servers/{id}) for a specific device ID, the API executes the complex calculation for that single record and returns the accuratenext_remediationtimestamp.
Recommended Workarounds & API Usage
Method 1: Retrieve Detailed Data via Single Device API Query
If you require the exact next_remediation timestamp for specific devices, query the device individually using its unique ID:
GET https://console.automox.com/api/servers/{device_id}?o={organization_id}Method 2: Determine Schedule via Policy Endpoints
If your automation needs to map upcoming remediation windows across multiple devices programmatically, query active policies directly using the Get Policies endpoint rather than iterating through device objects:
GET https://console.automox.com/api/policies?o={organization_id}The policy object contains the exact schedule configuration (schedule_days, start_time, configuration), allowing external scripts to determine when assigned devices will undergo remediation.