Spaces method and path for this operation:
post /s/{space_id}/api/detection_engine/signals/tags
Refer to Spaces for more information.
Add tags to detection alerts, and remove them from alerts, by alert IDs or a query, in a single request.
You cannot add and remove the same alert tag in the same request.
POST
/api/detection_engine/signals/tags
curl \
--request POST 'https://<KIBANA_URL>/api/detection_engine/signals/tags' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"ids":["549c7129c76cbd554aba1bd638f8a49dde95088f5832e50218358e7eca1cf16e"],"tags":{"tags_to_add":["Duplicate"],"tags_to_remove":[]}}'
Request examples
Add
{
"ids": [
"549c7129c76cbd554aba1bd638f8a49dde95088f5832e50218358e7eca1cf16e"
],
"tags": {
"tags_to_add": [
"Duplicate"
],
"tags_to_remove": []
}
}
{
"ids": [
"549c7129c76cbd554aba1bd638f8a49dde95088f5832e50218358e7eca1cf16e"
],
"tags": {
"tags_to_add": [],
"tags_to_remove": [
"Duplicate"
]
}
}
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)
{
"error": "Bad Request",
"message": "[request body].tags: cannot add and remove the same tag in a single request",
"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
}