Provides the ability to interact with the private message address book. Retrieve, add and remove users. When the private
message feature is enabled, people can send each other messages that aren't visible to others. The messages are
available through a private messages area of their profile page. With an address book specific to private messaging,
people can maintain a list of those with whom they exchange private messages. The functionality in this service
corresponds to actions users can take in the UI for private messages, available through their profile.
Use this service to add, remove, and otherwise update the list of people in a specified user's private message
address book.
| Method |
Description |
| addUser |
Adds the specified username to the user's address book. |
| addUsers |
Adds a list of users to the specified user's private message address book. |
| getRoster |
Retrieves a list of users contained in the specified user's address book. |
| removeUser |
Removes the specified username from the user's private message address book. |
| removeUsers |
Removes the specified list of users from a user's private message address book. |
addUser
Adds the specified username to the user's address book.
POST http://domain:port/application_context/rpc/rest/addressBookService/addressbooks
Arguments
| Name |
Type |
Description |
| userID |
xs:long |
ID of the user whose address book this is |
| usernameToAdd |
xs:string |
Username of the user to add |
Arguments Template
<addUser>
<userID>xs:long</userID>
<usernameToAdd>xs:string</usernameToAdd>
</addUser>Errors
| Error |
When Returned |
| UserNotFound |
If the userID specified is not a valid user. |
| Unauthorized |
If the userID doesn't belong to the right user and the user is not an administrator. |
addUsers
Adds a list of users to the specified user's private message address book.
POST http://domain:port/application_context/rpc/rest/addressBookService/bulk
Arguments
| Name |
Type |
Description |
| userID |
xs:long |
ID of the user whose address book this is |
| userIDsToAdd |
xs:long |
A list of user IDs to add to the address book |
Arguments Template
<addUsers>
<userID>xs:long</userID>
<!-- List of ... -->
<userIDsToAdd>xs:long</userIDsToAdd>
</addUsers>Errors
| Error |
When Returned |
| UserNotFound |
If the userID specified is not a valid user. |
| Unauthorized |
If the userID doesn't belong to the right user and the user is not an administrator. |
getRoster
Retrieves a list of users contained in the specified user's address book.
GET http://domain:port/application_context/rpc/rest/addressBookService/addressbooks/{userID}
Arguments
| Name |
Type |
Description |
| userID |
xs:long |
ID of the user whose address book this is |
Arguments Template
<getRoster>
<userID>xs:long</userID>
</getRoster>Response
| Type |
Description |
| List of User |
An array of users in the address book |
Response Template
<getRosterResponse>
<!-- List of ... -->
<return>
<!-- Contents of User -->
<return>
</getRosterResponse>Errors
| Error |
When Returned |
| UserNotFound |
If the userID specified is not a valid user. |
| Unauthorized |
If the userID doesn't belong to the right user and the user is not an administrator. |
removeUser
Removes the specified username from the user's private message address book.
DELETE http://domain:port/application_context/rpc/rest/addressBookService/addressbooks/{userID}/{usernameToRemove}
Arguments
| Name |
Type |
Description |
| userID |
xs:long |
ID of the user whose address book this is |
| usernameToRemove |
xs:string |
Username to remove from the address book |
Arguments Template
<removeUser>
<userID>xs:long</userID>
<usernameToRemove>xs:string</usernameToRemove>
</removeUser>Errors
| Error |
When Returned |
| UserNotFound |
If the userID specified is not a valid user. |
| Unauthorized |
If the userID doesn't belong to the right user and the user is not an administrator. |
removeUsers
Removes the specified list of users from a user's private message address book.
DELETE http://domain:port/application_context/rpc/rest/addressBookService/bulk/{userID}/{userIDsToRemove}
Arguments
| Name |
Type |
Description |
| userID |
xs:long |
ID of the user whose address book this is |
| userIDsToRemove |
xs:long |
A list of user IDs to remove from the address book |
Arguments Template
<removeUsers>
<userID>xs:long</userID>
<!-- List of ... -->
<userIDsToRemove>xs:long</userIDsToRemove>
</removeUsers>Errors
| Error |
When Returned |
| UserNotFound |
If the userID specified is not a valid user. |
| Unauthorized |
If the userID doesn't belong to the right user and the user is not an administrator. |