Retrieve the results of a policy at the device level for a given execution token
org required | string <uuid> Organization UUID org=56c0ba07-69f2-4f7c-b0a1-2bb0ed68578e |
sort | string Sort by sort=run_time:asc |
result_status | string Filter by Policy run result: result_status=applied |
device_name | string Filter by the device name. This will search both device hostname and custom name.Format: device_name=Marcus' Macbook Pro |
page | integer <int32> The page of results you wish to be returned with page numbers starting at 0. See About Automox API - Pagination page=0 |
limit | integer <int32> <= 5000 Default is 25, max is 5000 limit=25 |
OK
Bad Request
Unauthorized
Unauthorized Action
Not Found
Request Timeout
Rate Limit
Service Unavailable
$apiKey = 'your_automox_api_key' $axOrgUUID = 'your_automox_org_uuid' $axPolicyUUID = 'your_policy_uuid' $axExecToken = 'your_execution_token' $query = '?org=' + $axOrgUUID $headers = @{ "Authorization" = "Bearer $apiKey" "Content-Type" = "application/json" } $url = "https://policyreport.automox.com/policy-history/policies/$axPolicyUUID/$axExecToken" $response = (Invoke-WebRequest -Method Get -Uri ($url + $query) -Headers $headers).Content
{- "metadata": {
- "current_page": 0,
- "total_pages": 100,
- "total_count": 1300,
- "limit": 25,
- "links": {
- "previous": "",
- "next": "policyreport.automox.com?page=1&limit=25"
}
}, - "data": [
- {
- "device_id": 250624,
- "device_uuid": "56c0ba07-69f2-4f7c-b0a1-2bb0ed68578e",
- "hostname": "WIN-RM1OMA6IBCA",
- "custom_name": "Marcus' Macbook Pro",
- "display_name": "Marcus' Macbook Pro",
- "result_status": "success",
- "result-reason": "",
- "run_time": "2024-03-27T12:23:45Z",
- "event_time": "2024-03-27T12:23:45Z",
- "patches": [
- "KB123456",
- "KB234567"
], - "stdout": "Successfully installed KB123456\nSuccessfully installed KB234567\n",
- "stderr": "",
- "error_code": 1,
- "device_deleted_at": "2024-03-27T12:23:45Z",
- "policy_uuid": "56c0ba07-69f2-4f7c-b0a1-2bb0ed68578e",
- "policy_name": "Patch Tuesday",
- "policy_type": "patch"
}
]
}