portal-chat (xml)

Presents an HTTP interface onto Sakai's portal chat system.
RESTful URLs: http://microformats.org/wiki/rest/urls
HTTP response codes as returned by the system:
200 - OK (request is ok and content returned)
201 - CREATED (request created new content, URL and id of content in the header)
204 - NO CONTENT (request is ok but no content to return)
400 - ERROR (general error in the request, probably invalid parameters or data)
401 - UNAUTHORIZED (user authentication required for this request)
403 - FORBIDDEN (authorization required, insufficient privileges, user is already authenticated)
404 - NOT FOUND (resource not found, URL is invalid in some way, id or action are invalid)
405 - METHOD NOT ALLOWED (the method is not supported for this entity type)
406 - NOT ACCEPTABLE (the data format requested is unavailable for this entity type)
500 - INTERNAL SERVER ERROR (general server failure, probably a failure in the provider)
501 - NOT IMPLEMENTED (indicates that a prefix is invalid)

Sample Entity URLs (_id=':ID:') [may not be valid]:

Create Entity URL: POST /portal-chat
Response Code Details: 201 plus id (EntityId); 400 if inputs invalid
The URL format is "/direct/portal-chat/new"
Send a message to another user. Takes two parameters, 'to' (a Sakai user id) and 'message'.

Custom Actions

servers : show (GET) : [/portal-chat/:ID:/servers] (txt) (json)
latestData : show (GET) : [/portal-chat/:ID:/latestData] (txt) (json)
The URL format is "/direct/portal-chat/ANYTHING/latestData.json?online=true&siteId=SITEID".
Grabs all the latest data for the currently logged in user. This operation will also optionally set the heartbeat for the current user.
If you don't want to show up in chattable lists, pass false for online and you'll be hidden from others. The latestData operation retrieves your connections, your messages, and, if you specify a siteId parameter, the list of users currently in that site.
ping : show (GET) : [/portal-chat/:ID:/ping] (txt) (json)
The URL format is "/direct/portal-chat/USERTOPING/ping" where USERTOPING is a Sakai user id.
Returns the string "success" if an email is successfully sent to the user.

Entity class : org.sakaiproject.portal.chat.entity.PCServiceEntityProvider$UserMessage

Type :: bean
Name Type Status
1) clearbooleanRead/Write
2) contentstringRead/Write
3) fromstringRead/Write
4) fromConnectionbooleanRead/Write
5) siteIdstringRead/Write
6) timestamplongRead/Write
7) tostringRead/Write
8) videobooleanRead/Write

Data and Request Handling

Output formats : txt, json
Input formats : html
No Access Provider registered for request processing



REST:: 1.0.1 SVN: $Revision$ : $Date$