Get unified query history
- Base URL
-
https://{kibana_url}
- GET /api/osquery/history
- GET /s/{space_id}/api/osquery/history
Get a unified, time-sorted history of live, rule-triggered, and scheduled osquery executions. The response uses cursor-based pagination.
Path parameters
-
space_idstringoptional -
An identifier for the space. If
space_idis not provided in the URL, the default space is used. Refer to Spaces for more information.
Query parameters
-
nextPagestring · max length: 4096 -
A base64-encoded cursor for pagination. Use the value from the previous response to fetch the next page.
-
kuerystring · max length: 65536 -
A search string to filter history entries by pack name, query text, or query ID.
-
userIdsstring · max length: 65536 -
Comma-separated list of user IDs to filter live query history.
-
Example:
elastic,admin -
tagsstring · max length: 65536 -
A JSON-encoded array of tags to filter live query history. A comma-separated list is also accepted when the value is not valid JSON. Scheduled query runs have no tags, so they are left out when this filter is set.
-
Example:
["incident-42","prod"] -
sourceFiltersstring · max length: 64 -
Comma-separated list of source types to include. Valid values are
live,rule,scheduled, andworkflow. -
Example:
live,scheduled
Responses
Indicates a successful call.
-
dataunion oneOf[]required -
The list of unified history rows for the current page.
- One of:
-
agentCountintegerrequired -
For live queries, the number of agents targeted by the query. For scheduled rows, the number of distinct agents that responded.
-
originVerifiedboolean -
Set on
Workflowrows only. Whether Kibana verified that the workflow run made the request. Alwaysfalseuntil workflow runs can be verified.