All Policy Executions

Retrieve all policy executions for an organization

SecuritybearerAuth
Request
query Parameters
org
required
string <uuid>

Organization UUID

Example: org=56c0ba07-69f2-4f7c-b0a1-2bb0ed68578e
start_time
string

"Beginning of desired Timeframe. Format: start_time='2024-03-27T12:23:45Z'"

Example: start_time=2024-03-27T12:23:45Z
end_time
string

"End of desired Timeframe. Format: end_time='2023-04-27T12:23:45Z'"

Example: end_time=2023-04-27T12:23:45Z
policy_name
string

'Filter by Policy Name. Format: policy_name:in=patch,worklet. Available operators: equals, in, like'

Example: policy_name=patch
policy_uuid
string <uuid>

'Filter by Policy UUID. Format: policy_uuid:in=639b8c80-e0f3-418a-89e9-e6d9dfed36e7. Available operators: equals, `in'

Example: policy_uuid=385f2dde-dfa9-427d-bbd5-8f7fd95af0e9
policy_type
string

'Filter by Policy Types: custom, patch, required_software. Format: policy_type:in=required_software,custom. Available operators: equals, in'

Example: policy_type=required_software
result_status
string

'Filter by Result Statuses: success, failed, pending, not_applicable, not_included. Format: result_status:equals=success. Available operators: equals, in'

Example: result_status=success
sort
string
Default: "run_time:desc"

Sort by device_count, run_time, policy_name

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
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
Request samples
$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
Response samples
application/json
{
  • "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
      }
    ]
}