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
limit
optional
integer
A limit on the number of results to be returned; between 1 and 500 with a default of 500. Use in conjunction with the page parameter. See About Automox API > Pagination
page
optional
integer
The page of results you want to be returned with page numbers starting at 0. Use in conjunction with limit parameter. See About Automox API > Pagination.
countOnly
optional
integer
Use instead of page or limitto retrieve only the total count of events for the organization, or when used with an eventName, retrieve a count of that specific type of event. Possible values: 0, 1
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: org.exceeded_endpoint_limit saml.user.create slack.app.added slack.app.reinstalled system.add: device added to organization system.delete: device removed from organization system.group.action system.notification.response system.notification.sent system.patch.applied: patch installed on device system.patch.failed: patch failed to install on device system.patch.uninstall system.policy.action user.create: user added to organization user.login user.logout user.removed
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
o
required
integer
Organization ID. Response will include devices for the specified Automox organization. The organization will be assumed based on the API key, if not specified.
Response
200: OK
Event objects successfully retrieved.
[
{
"id": 123456789,
"name": "system.notification.response",
"user_id": null,
"server_id": 429883,
"organization_id": 1234,
"policy_id": null,
"data": {
"response": "TIMEOUT",
"notification_id": 2561399591
},
"server_name": "string",
"policy_name": null,
"policy_type_name": null,
"create_time": "2021-03-10 06:59:06.381681"
}
]

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