How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Elastic Stack (ELK Stack) Security Osquery API

Run live queries, manage packs and saved queries.

Elastic Stack (ELK Stack) Security Osquery API is one of 132 APIs that Elastic Stack (ELK Stack) publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Security Osquery API. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

This API exposes 21 operations across 14 paths, and defines 65 schemas. It is described by OpenAPI 3.2.0.

Requests are made against a single base URL, https://{kibana_url}.

21 operations 14 paths 65 schemas 2 DELETE10 GET7 POST2 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
Base URL
https://{elasticsearch_endpoint}
Authentication
API Key, HTTP Basic
Contact
Kibana Team
Resource Areas
1

Authentication & Security 2

Elastic Stack (ELK Stack) Security Osquery API declares 2 security schemes for authenticating requests. An API key is passed in the header as Authorization (apiKeyAuth). It accepts HTTP basic authentication (basicAuth). By default, every request must be authenticated.

  • apiKeyAuth — These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: Authorization: ApiKey base64A…

Paths & Operations 21

Across 14 paths, the API surfaces 21 operations — 2 DELETE, 10 GET, 7 POST, 2 PUT. Each is listed below with its method, path, parameters, and response codes.

Security Osquery API 21

Run live queries, manage packs and saved queries.

GET
/api/osquery/history
Get unified query history
OsqueryGetUnifiedHistory 7 params → 200
GET
/api/osquery/live_queries
Get live queries
OsqueryFindLiveQueries 5 params → 200
POST
/api/osquery/live_queries
Create a live query
OsqueryCreateLiveQuery body → 200
GET
/api/osquery/live_queries/{id}
Get live query details
OsqueryGetLiveQueryDetails 1 param → 200
GET
/api/osquery/live_queries/{id}/results/{actionId}
Get live query results
OsqueryGetLiveQueryResults 7 params → 200
POST
/api/osquery/live_queries/{id}/results/{actionId}/_export
Export live query results
OsqueryExportLiveQueryResults 3 params body → 200400403404
GET
/api/osquery/packs
Get packs
OsqueryFindPacks 4 params → 200
POST
/api/osquery/packs
Create a pack
OsqueryCreatePacks body → 200
DELETE
/api/osquery/packs/{id}
Delete a pack
OsqueryDeletePacks 1 param → 200
GET
/api/osquery/packs/{id}
Get pack details
OsqueryGetPacksDetails 1 param → 200
PUT
/api/osquery/packs/{id}
Update a pack
OsqueryUpdatePacks 1 param body → 200
POST
/api/osquery/packs/{id}/copy
Copy a pack
OsqueryCopyPacks 1 param → 200
GET
/api/osquery/saved_queries
Get saved queries
OsqueryFindSavedQueries 4 params → 200
POST
/api/osquery/saved_queries
Create a saved query
OsqueryCreateSavedQuery body → 200
DELETE
/api/osquery/saved_queries/{id}
Delete a saved query
OsqueryDeleteSavedQuery 1 param → 200
GET
/api/osquery/saved_queries/{id}
Get saved query details
OsqueryGetSavedQueryDetails 1 param → 200
PUT
/api/osquery/saved_queries/{id}
Update a saved query
OsqueryUpdateSavedQuery 1 param body → 200
POST
/api/osquery/saved_queries/{id}/copy
Copy a saved query
OsqueryCopySavedQuery 1 param → 200
GET
/api/osquery/scheduled_results/{scheduleId}/{executionCount}
Get scheduled action results
OsqueryGetScheduledActionResults 7 params → 200
POST
/api/osquery/scheduled_results/{scheduleId}/{executionCount}/_export
Export scheduled query results
OsqueryExportScheduledQueryResults 3 params body → 200400403
GET
/api/osquery/scheduled_results/{scheduleId}/{executionCount}/results
Get scheduled query results
OsqueryGetScheduledQueryResults 8 params → 200

Schemas 65

The contract defines 65 schemas that model the data the API accepts and returns. The most detailed are Security_Osquery_API_CreateLiveQueryRequestBody (13 properties), Security_Osquery_API_UnifiedHistoryRowBase (11 properties), Security_Osquery_API_ObjectQueriesItem (11 properties), Security_Osquery_API_UpdatePacksRequestBody (9 properties). Each schema is shown below with its type and property counts.

Security_Osquery_API_UnifiedHistoryRow
Security_Osquery_API_UnifiedHistoryRowBase
object
11 properties 4 required
Security_Osquery_API_Interval
string
An interval, in seconds, on which to run the query.
Security_Osquery_API_ObjectQueries
object
An object of queries.
Security_Osquery_API_ExportResultRow
object
A single result row from an NDJSON or JSON export. Fields follow the Elastic Common Schema (ECS) mapping defined on the originating query when available; other…
Security_Osquery_API_ScheduleType
string
Discriminator for the pack's schedule mode. interval uses native osqueryd interval scheduling (seconds). rrule uses osquerybeat's RRULE-based recurrence schedu…
Security_Osquery_API_ECSMappingItem
object
2 properties
Security_Osquery_API_UpdatePacksRequestBody
object
9 properties
Security_Osquery_API_CreateLiveQueryResponse
object
The response for creating a live query.
1 property 1 required
Security_Osquery_API_ExportMetadata
object
Metadata block produced for every export. Included as meta in the JSON response body and as the first NDJSON line.
8 properties 4 required
Security_Osquery_API_SortOrderOrUndefined
string
Specifies the sort order.
Security_Osquery_API_RRuleScheduleConfig
object
RRULE schedule configuration consumed by osquerybeat. Loose date forms like "2024-01-01" are rejected with 400. DTSTART is NOT embedded in rrule; the separate…
5 properties 2 required
Security_Osquery_API_CreatePacksRequestBody
object
9 properties
Security_Osquery_API_SavedQueryId
string
The ID of a saved query.
Security_Osquery_API_ScheduledExecutionMetadata
object
Execution metadata resolved from the pack saved object.
7 properties
Security_Osquery_API_ScheduledActionResultsAggregations
object
5 properties
Security_Osquery_API_Shards
object
An object with shard configuration for policies included in the pack. For each policy, set the shard configuration to a percentage (1–100) of target hosts.
Security_Osquery_API_PackDescription
string
The pack description.
Security_Osquery_API_Version
string
Uses the Osquery versions greater than or equal to the specified version string.
Security_Osquery_API_ExportRequestBody
objectnull
Optional request body for export endpoints. All fields are optional. Omit the body or send null or {} to export all results without additional filtering.
3 properties
Security_Osquery_API_PackId
string
The ID of the pack.
Security_Osquery_API_UpdatePacksResponse
object
The response for updating a pack.
1 property
Security_Osquery_API_LiveHistoryRow
Security_Osquery_API_ArrayQueriesItem
object
7 properties
Security_Osquery_API_GetUnifiedHistoryResponse
object
3 properties 2 required
Security_Osquery_API_FindSavedQueryDetailResponse
object
The details of a single saved query.
1 property 1 required
Security_Osquery_API_Query
string
The SQL query you want to run.
Security_Osquery_API_CreateSavedQueryRequestBody
object
9 properties
Security_Osquery_API_SavedQueryDescription
string
The saved query description.
Security_Osquery_API_PackName
string
The pack name.
Security_Osquery_API_ECSMappingArrayItem
object
ECS mapping item in saved-object storage format (key-value pair).
2 properties
Security_Osquery_API_CopySavedQueryResponse
object
The response for copying a saved query.
1 property 1 required
Security_Osquery_API_FindSavedQueryResponse
object
A paginated list of saved queries.
4 properties 4 required
Security_Osquery_API_FindLiveQueryDetailsResponse
object
1 property
Security_Osquery_API_FindPackResponse
object
The details of a single query pack.
1 property 1 required
Security_Osquery_API_PackInterval
integer
Pack-level interval, in seconds. Used when scheduletype is interval. Mutually exclusive with rruleschedule.
Security_Osquery_API_GetScheduledQueryResultsResponse
object
The response for getting scheduled query results.
1 property
Security_Osquery_API_ObjectQueriesItem
object
11 properties
Security_Osquery_API_ExportJsonResponse
object
JSON export response body. The meta field contains export metadata; results contains all result rows. Prefer ndjson for large exports since rows are streamed i…
2 properties 2 required
Security_Osquery_API_ECSMappingArray
array
ECS mapping in saved-object storage format (array of key-value pairs). The find and copy pack endpoints return this format. The read endpoint returns object fo…
Security_Osquery_API_UpdateSavedQueryRequestBody
object
9 properties
Security_Osquery_API_QueryId
string
The ID of the query.
Security_Osquery_API_PageOrUndefined
integernull
The page number to return. The default is 1.
Security_Osquery_API_FindPacksResponse
object
A paginated list of query packs.
4 properties 4 required
Security_Osquery_API_PolicyIds
array
A list of agents policy IDs.
Security_Osquery_API_ScheduledHistoryRow
Security_Osquery_API_CopyPacksResponse
object
The response for copying a pack.
1 property 1 required
Security_Osquery_API_Removed
boolean
Indicates whether the query is removed.
Security_Osquery_API_GetScheduledActionResultsResponse
object
8 properties
Security_Osquery_API_SortOrUndefined
stringnull
The field that is used to sort the results.
Security_Osquery_API_Snapshot
boolean
Indicates whether the query is a snapshot.
Security_Osquery_API_ExportFormat
string
The output format for the exported file. Use ndjson for streaming newline-delimited JSON (recommended for large exports), json for a single JSON array (held in…
Security_Osquery_API_CreateSavedQueryResponse
object
The response for creating a saved query.
1 property 1 required
Security_Osquery_API_Enabled
boolean
Enables the pack.
Security_Osquery_API_CreatePacksResponse
object
The response for creating a pack.
1 property 1 required
Security_Osquery_API_Platform
string
Restricts the query to a specified platform. The default is all platforms. To specify multiple platforms, use commas. For example, linux,darwin.
Security_Osquery_API_PageSizeOrUndefined
integernull
The number of results to return per page. The default is 20.
Security_Osquery_API_ArrayQueries
array
An array of queries to run.
Security_Osquery_API_UpdateSavedQueryResponse
object
The response for updating a saved query.
1 property 1 required
Security_Osquery_API_DefaultSuccessResponse
object
Security_Osquery_API_CreateLiveQueryRequestBody
object
13 properties
Security_Osquery_API_FindLiveQueryResponse
object
1 property
Security_Osquery_API_GetLiveQueryResultsResponse
object
The response for getting live query results.
1 property
Security_Osquery_API_ECSMapping
object
Map osquery results columns or static values to Elastic Common Schema (ECS) fields
Security_Osquery_API_KueryOrUndefined
stringnull
The kuery to filter the results by.

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

elk-stack-security-osquery-api-api-openapi.yml Raw ↑

Other APIs Elastic Stack (ELK Stack) publishes across the network.

Elastic Cloud API
Elastic Stack (ELK Stack) Accounts API
Elastic Stack (ELK Stack) Actions API
Elastic Stack (ELK Stack) agent builder API
Elastic Stack (ELK Stack) Alerting API
Elastic Stack (ELK Stack) Alerting V2 API
Elastic Stack (ELK Stack) Analytics API
Elastic Stack (ELK Stack) APM agent configuration API
Elastic Stack (ELK Stack) APM agent keys API
Elastic Stack (ELK Stack) APM annotations API
Elastic Stack (ELK Stack) APM server schema API
Elastic Stack (ELK Stack) APM sourcemaps API
Where this information came from

This is an independent, third-party profile of Elastic Stack (ELK Stack) Security Osquery API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.