@@ -763,13 +763,24 @@ def list_user_files(
763763 self ,
764764 mode : str ,
765765 identity : str ,
766+ tag : Optional [str ] = None ,
766767 request_metadata : Optional [Dict [str , Any ]] = None ,
767768 ) -> Dict [str , Any ]:
768- """List the metadata of all files owned by a user."""
769- data = {
769+ """List the metadata of all files owned by a user.
770+
771+ Args:
772+ mode: User identification mode (login, token, email, phone, custom)
773+ identity: User identifier corresponding to the mode
774+ tag: Optional. Return only files carrying this tag. A single tag
775+ only — a comma-separated list is not split.
776+ request_metadata: Additional metadata to include with the request
777+ """
778+ data : Dict [str , Any ] = {
770779 "mode" : mode ,
771780 "identity" : identity ,
772781 }
782+ if tag is not None :
783+ data ["tag" ] = tag
773784 return self ._make_request ("FileListUserFiles" , data , request_metadata )
774785
775786 def replace_file_tags (
@@ -1447,6 +1458,26 @@ def bulk_list_all_audit_events(
14471458 }
14481459 return self ._make_request ("BulkListAllAuditEvents" , data , request_metadata )
14491460
1461+ def bulk_list_files_by_tag (
1462+ self ,
1463+ unlock_uuid : str ,
1464+ tag : str ,
1465+ offset : int = 0 ,
1466+ limit : int = 10 ,
1467+ request_metadata : Optional [Dict [str , Any ]] = None ,
1468+ ) -> Dict [str , Any ]:
1469+ """List files carrying a tag, across all users in the tenant.
1470+
1471+ Requires the list_users configuration flag. A single tag only.
1472+ """
1473+ data = {
1474+ "unlockuuid" : unlock_uuid ,
1475+ "tag" : tag ,
1476+ "offset" : offset ,
1477+ "limit" : limit ,
1478+ }
1479+ return self ._make_request ("BulkListFilesByTag" , data , request_metadata )
1480+
14501481 def bulk_list_tokens (
14511482 self ,
14521483 unlock_uuid : str ,
0 commit comments