Skip to content

Commit 4a13f4a

Browse files
committed
[sc-80908] new PAPI to retrieve a user's last activity
1 parent ce9b441 commit 4a13f4a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dataikuapi/dss/admin.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ def get_settings(self):
169169
raw = self.client._perform_json("GET", "/admin/users/%s" % self.login)
170170
return DSSUserSettings(self.client, self.login, raw)
171171

172+
def get_last_activity(self):
173+
"""
174+
Gets the last activity of a user:
175+
- his last successful login attempt
176+
- his last failed login attempt
177+
- his last load of DSS
178+
:return: a dict
179+
"""
180+
return self.client._perform_json("GET", "/admin/users/%s/activity" % self.login)
181+
172182
########################################################
173183
# Legacy
174184
########################################################

0 commit comments

Comments
 (0)