Find and/or aggregate attack discovery alerts added in 9.5.0

POST /api/detection_engine/attacks/search

Spaces method and path for this operation:

post /s/{space_id}/api/detection_engine/attacks/search

Refer to Spaces for more information.

Find and/or aggregate attack discovery alerts that match the given query. Searches scheduled and ad hoc attack discovery alert indices for the active space only.

application/json

Body Required

Search and/or aggregation query

Responses

  • 200 application/json

    Successful response

    Elasticsearch search response

    Additional properties are allowed.

  • 400 application/json

    Invalid input data response

    One of:
  • 401 application/json

    Unsuccessful authentication response

    Hide response attributes Show response attributes object
    • error string Required
    • message string Required
    • statusCode integer Required
  • 500 application/json

    Internal server error response

    Hide response attributes Show response attributes object
    • message string Required
    • status_code integer Required
POST /api/detection_engine/attacks/search
curl \
 --request POST 'https://localhost:5601/api/detection_engine/attacks/search' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '"{\n  \"query\": {\n    \"ids\": {\n      \"values\": [\n        \"80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1\"\n      ]\n    }\n  }\n}"'
Request example
{
  "query": {
    "ids": {
      "values": [
        "80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1"
      ]
    }
  }
}
Response examples (200)
{
  "_shards": {
    "failed": 0,
    "skipped": 0,
    "successful": 1,
    "total": 1
  },
  "hits": {
    "hits": [
      {
        "_id": "80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1",
        "_index": ".internal.adhoc.alerts-security.attack.discovery.alerts-default-000001",
        "_score": 1,
        "_source": {
          "@timestamp": "2025-06-23T15:16:52.984Z",
          "kibana.alert.attack_discovery.alert_ids": [
            "ee183cf525d7e9d0f47d1b2bb928d760a0f53756ffa61edcf0672f71c986ac21",
            "46ebac989ca72439b14b57d32102543c17d5f33e0f6532d8a5c148949d8ff7b5"
          ],
          "kibana.alert.attack_discovery.title_with_replacements": "Widespread Malware Campaign via Compromised Account",
          "kibana.alert.workflow_status": "open"
        }
      }
    ],
    "max_score": 1,
    "total": {
      "relation": "eq",
      "value": 1
    }
  },
  "timed_out": false,
  "took": 1
}
Response examples (400)
{
  "error": "Bad Request",
  "message": "Failed to parse search request: unknown query clause in bool filter",
  "statusCode": 400
}
Response examples (401)
{
  "error": "Unauthorized",
  "message": "[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
  "statusCode": 401
}
Response examples (500)
{
  "message": "Internal Server Error",
  "status_code": 500
}