Add and remove attack discovery alert tags added in 9.5.0

POST /api/detection_engine/attacks/tags

Spaces method and path for this operation:

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

Refer to Spaces for more information.

Add tags to attack discovery alerts, and remove them from alerts, by attack IDs in a single request. Optionally cascade tag changes to related detection alerts.

application/json

Body Required

An object containing tags to add or remove and attack ids the changes will be applied to

  • ids array[string(nonempty)] Required

    A list of alerts ids.

    At least 1 element. Minimum length of each is 1.

  • tags object Required

    Object with list of tags to add and remove.

    Hide tags attributes Show tags attributes object
    • tags_to_add array[string(nonempty)] Required

      List of keywords to organize related alerts into categories that you can filter and group.

      Minimum length of each is 1.

    • tags_to_remove array[string(nonempty)] Required

      List of keywords to organize related alerts into categories that you can filter and group.

      Minimum length of each is 1.

Responses

  • 200 application/json

    Successful response

    Elasticsearch update by query 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/tags
curl \
 --request POST 'https://localhost:5601/api/detection_engine/attacks/tags' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '"{\n  \"ids\": [\n    \"80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1\"\n  ],\n  \"tags\": {\n    \"tags_to_add\": [\n      \"investigation\"\n    ],\n    \"tags_to_remove\": []\n  }\n}"'
Request examples
{
  "ids": [
    "80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1"
  ],
  "tags": {
    "tags_to_add": [
      "investigation"
    ],
    "tags_to_remove": []
  }
}
{
  "ids": [
    "80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1"
  ],
  "tags": {
    "tags_to_add": [],
    "tags_to_remove": [
      "investigation"
    ]
  }
}
{
  "ids": [
    "80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1"
  ],
  "tags": {
    "tags_to_add": [
      "investigation"
    ],
    "tags_to_remove": []
  },
  "update_related_alerts": true
}
Response examples (200)
{
  "batches": 1,
  "deleted": 0,
  "failures": [],
  "noops": 0,
  "requests_per_second": -1,
  "retries": {
    "bulk": 0,
    "search": 0
  },
  "throttled_millis": 0,
  "throttled_until_millis": 0,
  "timed_out": false,
  "took": 68,
  "total": 1,
  "updated": 1,
  "version_conflicts": 0
}
Response examples (400)
{
  "message": [
    "Duplicate tags [\"duplicate\"] were found in the tags_to_add and tags_to_remove parameters."
  ],
  "status_code": 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
}