Skip to content

Commit 09df66c

Browse files
committed
API endpoints to trigger a custom audit log
1 parent ad2007e commit 09df66c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

dataikuapi/dssclient.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,17 @@ def get_log(self, name):
596596
return self._perform_json(
597597
"GET", "/admin/logs/%s" % name)
598598

599+
def log_custom_audit(self, custom_type="", custom_params={}):
600+
"""
601+
Log a custom entry to the audit trail
602+
603+
:param str custom_type value for msgCustomType in audit trail item
604+
:param dict custom_params value for msgCustomParams in audit trail item
605+
"""
606+
return self._perform_empty("POST",
607+
"/admin/logs/audit/custom?msgCustomType=%s" % custom_type,
608+
body = custom_params)
609+
599610
########################################################
600611
# Variables
601612
########################################################

0 commit comments

Comments
 (0)