diff --git a/Sekoia.io/action_get_an_alert.json b/Sekoia.io/action_get_an_alert.json index 3ff561ebd..3a11723e9 100644 --- a/Sekoia.io/action_get_an_alert.json +++ b/Sekoia.io/action_get_an_alert.json @@ -15,6 +15,12 @@ "stix": { "in": "query", "type": "boolean" + }, + "cases": { + "in": "query", + "type": "boolean", + "description": "Get the cases associated with this alert", + "default": false } }, "required": [ @@ -714,6 +720,29 @@ }, "target": { "type": "string" + }, + "cases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "short_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "is_supplied": { + "type": "boolean" + }, + "manual": { + "type": "boolean" + }, + "status": { + "type": "string" + } + } + } } } } diff --git a/Sekoia.io/sekoiaio/operation_center/__init__.py b/Sekoia.io/sekoiaio/operation_center/__init__.py index 4374e6939..37be67fee 100644 --- a/Sekoia.io/sekoiaio/operation_center/__init__.py +++ b/Sekoia.io/sekoiaio/operation_center/__init__.py @@ -123,7 +123,7 @@ { "verb": "get", "endpoint": base_url + "alerts/{uuid}", - "query_parameters": ["stix"], + "query_parameters": ["stix", "cases"], }, ) diff --git a/Sekoia.io/tests/test_operation_center.py b/Sekoia.io/tests/test_operation_center.py index 8ea367830..65dbb03c9 100644 --- a/Sekoia.io/tests/test_operation_center.py +++ b/Sekoia.io/tests/test_operation_center.py @@ -38,6 +38,7 @@ def test_get_alert_success(): expected_response = { "community_uuid": "string", "countermeasures": [], + "cases": [], "updated_at": 0, "source": "string", "updated_by_type": "string",