Skip to content

Commit 1a5d65a

Browse files
committed
add new API calls
1 parent ad39d7e commit 1a5d65a

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

databunkerpro/api.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,14 +477,12 @@ def request_user_deletion(
477477

478478
def search_user(
479479
self,
480-
mode: str,
481480
identity: str,
482481
unlock_uuid: str,
483482
request_metadata: Optional[Dict[str, Any]] = None,
484483
) -> Dict[str, Any]:
485-
"""Search for a user with unlock UUID."""
484+
"""Search for a user with unlock UUID. Mode is auto-detected from identity."""
486485
data = {
487-
"mode": mode,
488486
"identity": identity,
489487
"unlockuuid": unlock_uuid,
490488
}
@@ -1572,6 +1570,34 @@ def get_user_html_report(
15721570
}
15731571
return self._make_request("SystemGetUserHTMLReport", data, request_metadata)
15741572

1573+
def get_user_profiles(
1574+
self,
1575+
mode: str,
1576+
identity: str,
1577+
unlock_uuid: str,
1578+
request_metadata: Optional[Dict[str, Any]] = None,
1579+
) -> Dict[str, Any]:
1580+
"""Get user profiles across all tenants. Only accessible by the main tenant admin."""
1581+
data = {
1582+
"mode": mode,
1583+
"identity": identity,
1584+
"unlockuuid": unlock_uuid,
1585+
}
1586+
return self._make_request("SystemGetUserProfiles", data, request_metadata)
1587+
1588+
def search_user_profiles(
1589+
self,
1590+
identity: str,
1591+
unlock_uuid: str,
1592+
request_metadata: Optional[Dict[str, Any]] = None,
1593+
) -> Dict[str, Any]:
1594+
"""Fuzzy-search user profiles across all tenants. Only accessible by the main tenant admin."""
1595+
data = {
1596+
"identity": identity,
1597+
"unlockuuid": unlock_uuid,
1598+
}
1599+
return self._make_request("SystemSearchUserProfiles", data, request_metadata)
1600+
15751601
def get_user_report(
15761602
self,
15771603
mode: str,

0 commit comments

Comments
 (0)