mirror of
https://github.com/brygphilomena/pyhuntress.git
synced 2025-11-04 16:27:30 +00:00
No longer requires a URL for huntress seim
This commit is contained in:
parent
67eca02b7a
commit
9bf56f734b
1
.gitignore
vendored
1
.gitignore
vendored
@ -209,3 +209,4 @@ __marimo__/
|
|||||||
# Development files
|
# Development files
|
||||||
managedsat_scratchpad.py
|
managedsat_scratchpad.py
|
||||||
siem_scratchpad.py
|
siem_scratchpad.py
|
||||||
|
.vscode/settings.json
|
||||||
|
|||||||
@ -24,7 +24,6 @@ class HuntressSIEMAPIClient(HuntressClient):
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
siem_url: str,
|
|
||||||
publickey: str,
|
publickey: str,
|
||||||
privatekey: str,
|
privatekey: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
@ -32,11 +31,9 @@ class HuntressSIEMAPIClient(HuntressClient):
|
|||||||
Initializes the client with the given credentials.
|
Initializes the client with the given credentials.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
siem_url (str): URL of your Huntress SIEM instance.
|
|
||||||
publickey (str): Your Huntress SIEM API public key.
|
publickey (str): Your Huntress SIEM API public key.
|
||||||
privatekey (str): Your Huntress SIEM API private key.
|
privatekey (str): Your Huntress SIEM API private key.
|
||||||
"""
|
"""
|
||||||
self.siem_url: str = siem_url
|
|
||||||
self.publickey: str = publickey
|
self.publickey: str = publickey
|
||||||
self.privatekey: str = privatekey
|
self.privatekey: str = privatekey
|
||||||
self.token_expiry_time: datetime = datetime.now(tz=timezone.utc)
|
self.token_expiry_time: datetime = datetime.now(tz=timezone.utc)
|
||||||
@ -100,7 +97,7 @@ class HuntressSIEMAPIClient(HuntressClient):
|
|||||||
Returns:
|
Returns:
|
||||||
str: API URL.
|
str: API URL.
|
||||||
"""
|
"""
|
||||||
return f"https://{self.siem_url}/v1"
|
return f"https://api.huntress.io/v1"
|
||||||
|
|
||||||
def _get_auth_key(self) -> str:
|
def _get_auth_key(self) -> str:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user