Types of APIs in the BlackBerry Administration API

The BlackBerry® Administration API contains methods that allow you to retrieve data from the BlackBerry Configuration Database, change data in the BlackBerry Configuration Database, or start synchronous or asynchronous events on the BlackBerry® Enterprise Server.

For some methods in the BlackBerry Administration API, there are two versions of the same API. One version works on a single object and the other version works on multiple objects. For example, you can use the createUser() method to create a BlackBerry device user account or you can use the createUsers() method to create a batch of BlackBerry device user accounts by invoking a single API. Single-object and multi-object APIs can be distinguished by the method name. Single-object APIs use a singular object name, such as createUser, while multi-object APIs use a plural object name, such as createUsers.

Best practice: Using multi-object APIs to optimize performance

The number of requests that your application sends over the network can affect the speed of your application. Multi-object APIs allow you to combine multiple operations into a single request. You can increase the speed and bandwidth efficiency of your application when you apply the same sequence of APIs to many similar data objects by using a multi-object API instead of a single-object API multiple times.

For example, if you have ten user accounts that you want to assign to a group and to resend service books to, using addUserToGroup() and resendServiceBookToUser() for each user account results in a total of 20 API requests. This task can be accomplished in two API requests by using addUsersToGroup() and resendServiceBookToUsers().


Was this information helpful? Send us your comments.