Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more cortex queries #370

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions thehive4py/endpoints/cortex.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,41 @@
"responderId": responder_id,
},
)

def list_analyzers(self) -> dict:
return self._session.make_request(

Check warning on line 32 in thehive4py/endpoints/cortex.py

View check run for this annotation

Codecov / codecov/patch

thehive4py/endpoints/cortex.py#L32

Added line #L32 was not covered by tests
"GET",
path="/api/connector/cortex/analyzer"
)

def list_analyzers_by_type(
self, data_type: str
) -> dict:
return self._session.make_request(

Check warning on line 40 in thehive4py/endpoints/cortex.py

View check run for this annotation

Codecov / codecov/patch

thehive4py/endpoints/cortex.py#L40

Added line #L40 was not covered by tests
"GET",
path=f"/api/connector/cortex/analyzer/type/{data_type}"
)

def get_analyzer(
self, object_id: str
) -> dict:
return self._session.make_request(

Check warning on line 48 in thehive4py/endpoints/cortex.py

View check run for this annotation

Codecov / codecov/patch

thehive4py/endpoints/cortex.py#L48

Added line #L48 was not covered by tests
"GET",
path=f"/api/connector/cortex/analyzer/{object_id}"
)

def get_analyzer_job(
self, job_id: str
) -> dict:
return self._session.make_request(

Check warning on line 56 in thehive4py/endpoints/cortex.py

View check run for this annotation

Codecov / codecov/patch

thehive4py/endpoints/cortex.py#L56

Added line #L56 was not covered by tests
"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(

Check warning on line 64 in thehive4py/endpoints/cortex.py

View check run for this annotation

Codecov / codecov/patch

thehive4py/endpoints/cortex.py#L64

Added line #L64 was not covered by tests
"GET",
f"/api/connector/cortex/responder/{entity_type}/{entity_id}"
)
Loading