Skip to content

Commit 94bab83

Browse files
author
Adrien Lavoillotte
authored
Merge PR #38 Custom audit log entry
from feature/dss51-custom-audit-log
2 parents ad2007e + ed361dc commit 94bab83

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 customMsgType in audit trail item
604+
:param dict custom_params value for customMsgParams in audit trail item
605+
"""
606+
return self._perform_empty("POST",
607+
"/admin/audit/custom/%s" % custom_type,
608+
body = custom_params)
609+
599610
########################################################
600611
# Variables
601612
########################################################

0 commit comments

Comments
 (0)