mirror of
https://github.com/FunnyWolf/agentic-soc-platform.git
synced 2026-08-22 13:12:56 +02:00
1029
This commit is contained in:
+2
-1
@@ -3,7 +3,7 @@ from rest_framework import routers
|
||||
|
||||
from Automation.views import PlaybookView
|
||||
from Core.views import BaseAuthView, CurrentUserView
|
||||
from Forwarder.views import WebhookSplunkView, WebhookKibanaView
|
||||
from Forwarder.views import WebhookSplunkView, WebhookKibanaView, WebhookNocolyMailView
|
||||
|
||||
router = routers.DefaultRouter(trailing_slash=False)
|
||||
router.register(r'api/login/account', BaseAuthView, basename="BaseAuth")
|
||||
@@ -11,6 +11,7 @@ router.register(r'api/currentUser', CurrentUserView, basename="CurrentUser")
|
||||
|
||||
router.register(r'api/v1/webhook/splunk', WebhookSplunkView, basename="WebhookSplunkView")
|
||||
router.register(r'api/v1/webhook/kibana', WebhookKibanaView, basename="WebhookKibanaView")
|
||||
router.register(r'api/v1/webhook/nocolymail', WebhookNocolyMailView, basename="WebhookNocolyMailView")
|
||||
router.register(r'api/v1/automation/playbook', PlaybookView, basename="PlaybookView")
|
||||
urlpatterns = [
|
||||
re_path(r'^', include(router.urls)),
|
||||
|
||||
@@ -4,10 +4,10 @@ from Lib.External.nocolyapi import WorksheetRow
|
||||
from Lib.baseplaybook import BasePlaybook
|
||||
|
||||
|
||||
class Module(BasePlaybook):
|
||||
class Playbook(BasePlaybook):
|
||||
|
||||
def __init__(self, params):
|
||||
super().__init__(params) # do not delete this code
|
||||
def __init__(self):
|
||||
super().__init__() # do not delete this code
|
||||
|
||||
def run(self):
|
||||
worksheet = self.param("worksheet")
|
||||
@@ -26,7 +26,8 @@ class Module(BasePlaybook):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
params = {'playbook': 'TI_artifact_query_mock', 'rowid': 'c6caa5eb-b4af-44df-aa10-b94829243fd4', 'worksheet': 'Artifact'}
|
||||
module = Module(params)
|
||||
params_debug = {'playbook': 'TI_artifact_query_mock', 'rowid': 'a966036e-b29e-4449-be48-23293bacac5d', 'worksheet': 'Artifact'}
|
||||
module = Playbook()
|
||||
module._params = params_debug
|
||||
result = module.run()
|
||||
print(result)
|
||||
|
||||
Reference in New Issue
Block a user