mirror of
https://github.com/brygphilomena/pyhuntress.git
synced 2025-11-07 01:27:29 +00:00
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
from pyhuntress.endpoints.base.huntress_endpoint import HuntressEndpoint
|
|
from pyhuntress.interfaces import (
|
|
IGettable,
|
|
)
|
|
from pyhuntress.models.siem import SIEMSignals
|
|
from pyhuntress.types import (
|
|
JSON,
|
|
HuntressSIEMRequestParams,
|
|
)
|
|
|
|
|
|
class SignalsEndpoint(
|
|
HuntressEndpoint,
|
|
IGettable[SIEMSignals, HuntressSIEMRequestParams],
|
|
):
|
|
def __init__(self, client, parent_endpoint=None) -> None:
|
|
HuntressEndpoint.__init__(self, client, "signals", parent_endpoint=parent_endpoint)
|
|
IGettable.__init__(self, SIEMSignals)
|
|
|
|
def get(
|
|
self,
|
|
data: JSON | None = None,
|
|
params: HuntressSIEMRequestParams | None = None,
|
|
) -> SIEMSignals:
|
|
"""
|
|
Performs a GET request against the /Signals endpoint.
|
|
|
|
Parameters:
|
|
data (dict[str, Any]): The data to send in the request body.
|
|
params (dict[str, int | str]): The parameters to send in the request query string.
|
|
Returns:
|
|
SIEMAuthInformation: The parsed response data.
|
|
"""
|
|
return self._parse_many(
|
|
SIEMSignals,
|
|
super()._make_request("GET", data=data, params=params).json().get('signals', {}),
|
|
)
|