pyhuntress/src/pyhuntress/endpoints/siem/SignalsEndpoint.py
Peter Annabel b3fe77725f Initial Commit
Add get endpoint for all Huntress SIEM endpoints
2025-07-23 13:47:48 -05:00

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', {}),
)