From 43b02ccf7d0c52c3c1420f4932cd66d6ccfd76a9 Mon Sep 17 00:00:00 2001 From: Anko59 Date: Tue, 26 Nov 2024 15:57:03 +0100 Subject: [PATCH] more cortex queries --- thehive4py/endpoints/cortex.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/thehive4py/endpoints/cortex.py b/thehive4py/endpoints/cortex.py index 8bf8a638..87f7458e 100644 --- a/thehive4py/endpoints/cortex.py +++ b/thehive4py/endpoints/cortex.py @@ -27,3 +27,26 @@ def create_responder_action( "responderId": responder_id, }, ) + + def list_analyzers(self) -> dict: + return self._session.make_request("GET", path="/api/connector/cortex/analyzer") + + def list_analyzers_by_type(self, data_type: str) -> dict: + return self._session.make_request( + "GET", path=f"/api/connector/cortex/analyzer/type/{data_type}" + ) + + def get_analyzer(self, object_id: str) -> dict: + return self._session.make_request( + "GET", path=f"/api/connector/cortex/analyzer/{object_id}" + ) + + def get_analyzer_job(self, job_id: str) -> dict: + return self._session.make_request( + "GET", path=f"/api/connector/cortex/analyzer/{job_id}" + ) + + def list_responders(self, entity_type: str, entity_id: str) -> dict: + return self._session.make_request( + "GET", f"/api/connector/cortex/responder/{entity_type}/{entity_id}" + )