diff --git a/main/404.html b/main/404.html index c9ef229..65f9127 100644 --- a/main/404.html +++ b/main/404.html @@ -12,7 +12,7 @@ - + diff --git a/main/examples/alert/index.html b/main/examples/alert/index.html index 368d04a..a6e5257 100644 --- a/main/examples/alert/index.html +++ b/main/examples/alert/index.html @@ -16,7 +16,7 @@ - + @@ -919,18 +919,22 @@

An advanced alert

Fortunately we can use thehive4py's type hints to the rescue and specify more complex input alerts outside of the method call.

Here's how:

from thehive4py import TheHiveApi
+from thehive4py.types.alert import InputAlert
 
 hive = TheHiveApi(url="http://localhost:9000", apikey="h1v3b33")
 
-simple_alert = hive.alert.create(
-    alert={
-        "type": "simple",
-        "source": "tutorial",
-        "sourceRef": "should-be-unique",
-        "title": "a simple alert",
-        "description": "a bit too simple",
-    }
-)
+input_alert: InputAlert = {
+    "type": "advanced",
+    "source": "tutorial",
+    "sourceRef": "should-be-unique",
+    "title": "an advanced alert",
+    "description": "a bit more advanced",
+    "tags": ["advanced", "example"],
+    "severity": 1,
+    "caseTemplate": "my-template",
+}
+
+output_alert = hive.alert.create(alert=input_alert)
 

In the above snippet input_alert is created before the create call and later passed to the alert argument. Finally after the creation of the alert we saved the response in the output_alert to be able to use it later.

@@ -1034,7 +1038,7 @@

Add file based observables

This way TheHive will know which attachment to pair with which observable behind the scenes.

In our example attachment_key is used to specify the relationship between the observable and the actual file. In this case its value is a uuid, however it can be any arbitrary value, though it's important that it should uniquely identify the attachment and the observable we would like to pair in TheHive.

Update single and bulk

-

Sometimes an existing alert needs to be updated. TheHive offers multiple ways to accomplish this task either with a single alert or multiple ones.

+

Sometimes an existing alert needs to be updated. thehive4py offers multiple ways to accomplish this task either with a single alert or multiple ones.

Update single

A single alert can be updated using alert.update method. The method requires the alert_id of the alert to be updated and the fields to update.

import uuid
diff --git a/main/examples/client/index.html b/main/examples/client/index.html
index e99e7ec..e769fa3 100644
--- a/main/examples/client/index.html
+++ b/main/examples/client/index.html
@@ -16,7 +16,7 @@
       
       
       
-      
+      
     
     
       
diff --git a/main/index.html b/main/index.html
index d343e4e..be3eb54 100644
--- a/main/index.html
+++ b/main/index.html
@@ -14,7 +14,7 @@
       
       
       
-      
+      
     
     
       
diff --git a/main/reference/index.html b/main/reference/index.html
index 3a1b9ce..5ffe215 100644
--- a/main/reference/index.html
+++ b/main/reference/index.html
@@ -14,7 +14,7 @@
       
       
       
-      
+      
     
     
       
diff --git a/main/sitemap.xml.gz b/main/sitemap.xml.gz
index 8f2bbf5..b251d30 100644
Binary files a/main/sitemap.xml.gz and b/main/sitemap.xml.gz differ