Retrieve all policy executions for an organization
org required | string <uuid> Organization UUID Example: org=56c0ba07-69f2-4f7c-b0a1-2bb0ed68578e |
start_time | string "Beginning of desired Timeframe. Format: Example: start_time=2024-03-27T12:23:45Z |
end_time | string "End of desired Timeframe. Format: Example: end_time=2023-04-27T12:23:45Z |
policy_name | string 'Filter by Policy Name. Format: Example: policy_name=patch |
policy_uuid | string <uuid> 'Filter by Policy UUID. Format: Example: policy_uuid=385f2dde-dfa9-427d-bbd5-8f7fd95af0e9 |
policy_type | string 'Filter by Policy Types: Example: policy_type=required_software |
result_status | string 'Filter by Result Statuses: Example: result_status=success |
sort | string Default: "run_time:desc" Sort by Example: sort=policy_name:asc,run_time:desc |
page | integer <int32> The page of results you wish to be returned with page numbers starting at 0. See About Automox API - Pagination |
limit | integer <int32> <= 5000 Default is 25, max is 5000 Example: 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' $headers = @{ "Authorization" = "Bearer $apiKey" "Content-Type" = "application/json" } $url = "https://policyreport.automox.com/policy-history/policy-runs?org=$axOrgUUID" $response = (Invoke-WebRequest -Method Get -Uri $url -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": [
- {
- "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
}
]
}