Using the sdk for retrieving and managing the AI Analyst incidents I stumbled on a bug, namely the method acknowledge of the class Analyst (and I believe the others too) fails in bad request due to '{ "aianalyst": "API SIGNATURE ERROR"}'. I tried several things and I ended up fixing it by adding params={"uuid": uuids}, to the self._post_form parameters called inside the method. Below the code for reference.
File dt_analyst.py inside class Analyst
def acknowledge(
self,
uuids: str | list[str],
timeout: float | tuple[float, float] | None = _UNSET,
) -> dict:
"""Acknowledge AI Analyst incident events.
Args:
uuids: Single UUID string or list of UUID strings.
Returns:
dict: Full Darktrace API response.
"""
if isinstance(uuids, list):
uuids = ",".join(uuids)
return self._post_form(
"/aianalyst/acknowledge",
post_form={"uuid": uuids},
params={"uuid": uuids}, #added to fix the bug
timeout=timeout,
)
Using the sdk for retrieving and managing the AI Analyst incidents I stumbled on a bug, namely the method acknowledge of the class Analyst (and I believe the others too) fails in bad request due to '{ "aianalyst": "API SIGNATURE ERROR"}'. I tried several things and I ended up fixing it by adding
params={"uuid": uuids},to the self._post_form parameters called inside the method. Below the code for reference.File dt_analyst.py inside class Analyst