Create a live query
- Base URL
-
https://{kibana_url}
- POST /api/osquery/live_queries
- POST /s/{space_id}/api/osquery/live_queries
Refer to Spaces for more information.
Create and run a live query.
Request body
-
ecs_mappingmap string to object -
Map osquery results columns or static values to Elastic Common Schema (ECS) fields
-
queriesobject -
An array of queries to run.
-
ecs_mappingmap string to object -
Map osquery results columns or static values to Elastic Common Schema (ECS) fields
-
enabledboolean -
Whether this query is enabled. When false, the query is omitted from the Fleet policy. Default is true.
-
platformstring -
Restricts the query to a specified platform. The default is all platforms. To specify multiple platforms, use commas. For example,
linux,darwin. -
result_type -
Controls the result document type emitted by osquerybeat for this pack or query.
snapshot: Full table snapshot on every scheduled run (default).differential: Rows added or removed since the previous run.differential_added_only: Only rows added since the previous run (no removals).
-
Values:
snapshotdifferentialdifferential_added_only
Response
Indicates a successful call.