List all data extracts for an organization

This retrieves all data extracts for an organization with ability to filter and sort results.

get
data-extracts

https://console.automox.com/api/data-extracts
Request
Response
Request
Headers
Authentication
required
string
Your Automox API Key for authentication. Format: Authorization: Bearer your_automox_api_key
Query Parameters
o
required
integer
Organization ID. Response will include all data extracts for the specified Automox organization.
limit
optional
integer
Maximum number of results to be returned per page; between 1 and 500 with a default of 25. Use in conjunction with the page parameter.
page
optional
integer
Retrieve a specific page of results with page numbers starting at 0. Default: 0. Use in conjunction with the limit parameter.
sort
optional
array
The sort for the results. Options: created_at:desc/asc and status:desc/asc Default: created_at:desc
type:equals
optional
string
The type of data extract to list. Options: patch-history
created_at:lesser_than
optional
string
Created at date is less than the value submitted. If a time is not specified, the time will be at the end of the day.
created_at:greater_than
optional
string
Created at date is greater than the value submitted. If a time is not specified, the time will be the start of the day.
created_at:lesser_than_or_equals
optional
string
Created at date is less than or equals the value submitted. If a time is not specified, the time will be the end of the day.
created_at:greater_than_or_equals
optional
string
Created at date is greater than or equals the value submitted. If a time is not specified, greater_than_or_equals will have a time of start of the day.
status:equals
optional
string
Find jobs with one of these statuses. Available values: queued, running, complete, failed, canceled, expired.
status:in
optional
array
Find jobs with one of these statuses. Available values: queued, running, complete, failed, canceled, expired.
Response
200: OK
List of data extracts successfully retrieved.
{
"id": 156,
"organization_id": 1234,
"user_id": 36700,
"type": "patch-history",
"status": "queued",
"is_completed": false,
"created_at": "2021-05-26T19:55:42.906067+0000",
"download_expires_at": null,
"download_url": null,
"parameters": {
"start_time": "2021-03-28T13:31:57+0000",
"end_time": "2021-03-30T06:42:12+0000"
}
}

Example Requests

cURL
Python http.client
Python requests
C#
PowerShell
cURL
curl -X GET \
  'https://console.automox.com/api/data-extracts?o=0000&limit=500&sort=created_at:desc' \
  -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,data-extracts, headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Python requests
import requests
url = "https://console.automox.com/api/data-extracts"
querystring = {"o":"0000","limit":"500"}
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/data-extracts?o=0000&limit=500&");
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/data-extracts?o=0000&limit=500&"
$response = (Invoke-WebRequest -Method Get -Uri $url -Headers $headers).Content