Lists all events

This retrieves all event objects for the authenticated user.

get
/events

https://console.automox.com/api/events
Events Include: Policy Actions, Device Addition/Removal, User Addition/Removal
Request
Response
Request
Headers
Authorization: Bearer
required
string
Your Automox API Key for authentication Format: Authorization: Bearer your_automox_api_key
Query Parameters
page
optional
integer
Retrieve a specific page of events. Use in conjunction with limit parameter
countOnly
optional
boolean
Retrieve only the total count of events for the organization
policyId
optional
integer
Retrieve events for a specific policy
serverId
optional
integer
Retrieve events for a specific device
userId
optional
integer
Retrieve events for a specific user
eventName
optional
string
Name for the event type. Possible values: user.create: user added to organization system.add: device added to organization system.delete: device removed from organization system.patch.applied: patch installed on device system.patch.failed: patch failed to install on device
startDate
optional
string
Limit response to include only events after this date Format: yyyy-mm-dd
endDate
optional
string
Limit response to include only events before this date Format: yyyy-mm-dd
limit
optional
integer
Maximum number of events to retrieve per page. Use in conjunction with page parameter
o
required
integer
Limit response to a specific Automox organization ID
Response
200: OK
Event object successfully retrieved.
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string",
"description": "Event type",
"example": "system.add"
},
"user_id": {
"type": "integer",
"format": "int64"
},
"server_id": {
"type": "integer",
"format": "int64"
},
"organization_id": {
"type": "integer",
"format": "int64"
},
"policy_id": {
"type": "integer"
},
"data": {
"type": "object",
"properties": {
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"email": {
"type": "string"
},
"orgname": {
"type": "string"
},
"ip": {
"type": "string"
},
"os": {
"type": "string"
},
"systemname": {
"type": "string"
},
"text": {
"type": "string"
},
"status": {
"type": "integer",
"format": "int64"
},
"patches": {
"type": "string"
}
}
},
"server_name": {
"type": "string"
},
"policy_name": {
"type": "string"
},
"policy_type_name": {
"type": "string"
},
"create_time": {
"type": "string",
"format": "date-time",
"description":"in UTC"
}
}
}
}
404: Not Found
Could not find an event matching this query.
{
"message": "No event found."
}

get

https://console.automox.com/api/events
Request
Response
Request
Query Parameters
eventName
optional
string
system.patch
Response
200: OK

Example Requests

cURL
Python http.client
Python requests
C#
PowerShell
cURL
curl -X GET \
'https://console.automox.com/api/events?o=0000&limit=1&startDate=2019-05-04&endDate=2019-05-07' \
-H 'Authorization: Bearer your_automox_api_key'
Python http.client
import http.client
conn = http.client.HTTPConnection("console,automox,com")
headers = {
'Authorization': "Bearer your_automox_api_key"
}
conn.request("GET", "api,events", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Python requests
import requests
url = "https://console.automox.com/api/events"
querystring = {"o":"0000","limit":"1","startDate":"2019-05-04","endDate":"2019-05-07"}
headers = {
'Authorization': "Bearer your_automox_api_key"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
C#
var client = new RestClient("https://console.automox.com/api/events?o=0000&limit=1&startDate=2019-05-04&endDate=2019-05-07");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer your_automox_api_key");
IRestResponse response = client.Execute(request);
PowerShell
$apiKey = 'your_automox_api_key'
$headers = @{ "Authorization" = "Bearer $apiKey" }
$url = "https://console.automox.com/api/events?o=0000&limit=2&startDate=2019-05-04&endDate=2019-05-07"
$response = (Invoke-WebRequest -Method Get -Uri $url -Headers $headers).Content