diff --git a/thehive4py/endpoints/observable.py b/thehive4py/endpoints/observable.py index 8a510881..2141a20e 100644 --- a/thehive4py/endpoints/observable.py +++ b/thehive4py/endpoints/observable.py @@ -111,3 +111,18 @@ def count(self, filters: Optional[FilterExpr] = None) -> int: params={"name": "observable.count"}, json={"query": query}, ) + + def download_attachment( + self, + observable_id: str, + attachment_id: str, + observable_path: str, + as_zip: bool = False + ) -> None: + return self._session.make_request( + "GET", + path=(f"/api/v1/observable/{observable_id}" + f"/attachment/{attachment_id}/download"), + params={"asZip": as_zip}, + download_path=observable_path, + )