Policy Executions per Policy

Retrieve all policy executions for a policy

SecuritybearerAuth
Request
path Parameters
policy_uuid
required
string <uuid>

Policy UUID

Examples:
56c0ba07-69f2-4f7c-b0a1-2bb0ed68578e
query Parameters
org
required
string <uuid>

Organization UUID

Examples:
org=56c0ba07-69f2-4f7c-b0a1-2bb0ed68578e
report_days
integer <int32>
Default: 7

Number of Days Before Today's Date

Examples:
report_days=7
sort
string

Sort by run_time

Examples:
sort=run_time:asc
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Unauthorized Action

404

Not Found

408

Request Timeout

429

Rate Limit

500

Service Unavailable

get/policy-history/policy-runs/{policy_uuid}
Request samples
$apiKey = 'your_automox_api_key'
$axOrgUUID = 'your_automox_org_uuid'
$axPolicyUUID = 'your_policy_uuid'
$query = '?org=' + $axOrgUUID
$headers = @{
  "Authorization" = "Bearer $apiKey"
  "Content-Type" = "application/json"
  }
$url = "https://policyreport.automox.com/policy-history/policy-runs/$axPolicyUUID"
$response = (Invoke-WebRequest -Method Get -Uri ($url + $query) -Headers $headers).Content
Response samples
application/json
{
  • "data": {
    • "runs": [
      • {
        • "policy_uuid": "56c0ba07-69f2-4f7c-b0a1-2bb0ed68578e",
        • "policy_id": 123456,
        • "org_uuid": "56c0ba07-69f2-4f7c-b0a1-2bb0ed68578e",
        • "policy_name": "Patch Tuesday",
        • "policy_type": "patch",
        • "policy_deleted_at": "2024-03-27T12:23:45Z",
        • "device_count": 100,
        • "pending": 10,
        • "success": 80,
        • "remediation_not_applicable": 5,
        • "failed": 5,
        • "run_time": "2024-03-27T12:23:45Z",
        • "execution_token": "56c0ba07-69f2-4f7c-b0a1-2bb0ed68578e",
        • "run_count": 100,
        • "not_included": 5
        }
      ],
    • "banner_stats": {
      • "policy_success_rate": 95.5,
      • "total_policies_applied": 100,
      • "total_successful_devices": 95
      }
    },
  • "metadata": {
    • "total_run_count": 100,
    • "last_run_time": "2024-03-27T12:23:45Z"
    }
}