Create a saved query Beta

POST /api/osquery/saved_queries

Create and run a saved query.

application/json; Elastic-Api-Version=2023-10-31

Body Required

Responses

  • 200 application/json; Elastic-Api-Version=2023-10-31

    OK

    Additional properties are allowed.

POST /api/osquery/saved_queries
curl \
 -X POST https://<KIBANA_URL>/api/osquery/saved_queries \
 -H "Content-Type: application/json; Elastic-Api-Version=2023-10-31"
Request examples
{
  "description": "string",
  "ecs_mapping": {
    "additionalProperty1": {
      "field": "string",
      "value": "string"
    },
    "additionalProperty2": {
      "field": "string",
      "value": "string"
    }
  },
  "id": "string",
  "interval": "string",
  "platform": "string",
  "query": "string",
  "removed": true,
  "snapshot": true,
  "version": "string"
}
Response examples (200)
{}