Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Web Services

New Contributor
Posts: 3
Registered: ‎02-06-2014
My Device: Q10
Accepted Solution

Web API call to get all BlackBerry10 Devices

Hi Community,


we developed an own ASP.NET-based website for our UserHelpDesk that they can see informations about a users device. To get all BlackBerry10 devices we use the API with the following code:


GetUsersRequest request = new GetUsersRequest();
RequestMetadata metadata = new RequestMetadata();
metadata.clientVersion = ClientVersion;
metadata.locale = Locale;
metadata.organizationUid = OrgUid;
request.metadata = metadata;
GetUsersSearchCriteria searchCriteria = new GetUsersSearchCriteria();
request.searchCriteria = searchCriteria;
request.pageSize = 0;
GetUsersSortBy sortBy = new GetUsersSortBy();
sortBy.EMAIL_ADDRESS = true;
sortBy.value = "EMAIL_ADDRESS";
request.sortBy = sortBy;

GetUsersResponse response = service.getUsers(request);


The problem is now, that only 2000 devices come back as a result set! When we try to change the pageSize to 3000, then an error appears with message "pageSize too large" appears. Is there a possibility to get more than 2000 devices back from the service?




Please use plain text.
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: Web API call to get all BlackBerry10 Devices

Hi Steffen,


The GetUsersRequest call, and most calls in BWS, will paginate the responses to help with efficiency and load of the system. The call has a parameter "lastUserUid" which can be set to denote where the next query should begin, so say you make your call with 2,000 users listed and the last user in that list has an ID of "2000", if you pass that ID into the next GetUsersRequest then the query will begin at the next user ID, ex "2001", and continue from there.

Goodbye everybody!
Please use plain text.
Posts: 1
Registered: ‎05-31-2014
My Device: 0564300063

Re: Web API call to get all BlackBerry10 Devices

Please use plain text.