ClientUserListAdvanced Method (Int32, Int32, ClientUserPermissionFilter, ClientUserStatusFilter, String, ClientUserSearchStringFilter, String) |
Namespace: MOVEit.DMZ.API
public List<MOVEitUserInfo> UserListAdvanced( int Page, int EntriesPerPage, ClientUserPermissionFilter PermissionFilter, ClientUserStatusFilter StatusFilter, string GroupFilter, ClientUserSearchStringFilter SearchStringFilter, string SearchString )
Returns an empty List if no users are found or null if the currently authorized user is not permitted to get this information.
This function allows more customization in which users are returned then the UserList(String) function. Most importantly, this function supports "paging", which allows programs to separate user lists into more manageable "pages", which contain only some of the results of the list. This is necessary when trying to list a large number of users, as MOVEit Transfer enforces a 1000 entry limit on the number of users that can be returned from a single listing, for performance reasons. The Page argument specifies the page number to return (starting with 1). The EntriesPerPage argument determines the number of entries that will be returned in each page (minimum 5, maximum 1000). Once the first page of the list has returned, the class-level UserListCount value will contain the total number of users available via the provided filters. The number of pages of users that can be retrieved can then be calculated using that value and the EntriesPerPage argument via the following algorithm:
if ((objAPI.UserListCount mod EntriesPerPage) > 0) { number_of_pages = (objAPI.UserListCount div EntriesPerPage) + 1 } else { number_of_pages = objAPI.UserListCount div EntriesPerPage }
If the Page argument is set to a value higher than the total number of pages available, the first page of results will be returned.
Other capabilities of this function beyond UserList(String) include the ability to specify various filters and search strings to narrow down the list of returned users.