RESTAPI

REST API

token=API_TOKEN |POST api/sessions?token=API_TOKEN | (get SESSIONID from api/sessions) | (get USERID from api/session) | Gets a particular message. | replyto=message_id |POST api/messages?message=MESSAGE_BODY&via=CLIENT&tags=TAGS&metadata=XML&replyto=MESSAGEID | POST api/users/USERID/followees?user=USERID2 | DELETE api/users/USERID/followees?user=USERID2 | (This doesn't really seem like an appropriate API method. It should really return all of the tags, or user-specific tags (GET api/tags/USERID) and let the front-end decide what to do with it.) | track=text |POST api/users/USERID/tracks?track=TEXT_TO_TRACK | trackid=id_of_tracking_item |DELETE api/users/USERID/tracks/TRACKID | conversationid=Conversation_id |GET api/conversations/CONVERSATIONID | (Actions probably don't make sense outside of the context of a specific user.) | action=action |POST api/users/USERID/actions?name=NAME&test=TEST&action=ACTION | (This is actually a general outlet to update any attribute of an action, including whether or not it is enabled.) | actionid=action_id |DELETE api/users/USERID/actions/ACTIONID |
h3. Current (RPC) h3.REST
GET /api/wait_for_msgs GET api/users/USERID/messages (long-poll?)
GET /api/get_following GET api/users/USERID/followees
GET /api/get_followers GET api/users/USERID/followers
GET /api/all_users GET api/users
GET /api/get_tracking GET api/users/USERID/tracks

One point to note is that most HTTP clients do not currently support the "PUT" or "DELETE" methods, so these have to be simulatedthrough POST methods with an extra parameter. I think that because of the close mapping to resource verbs, is worth using these methods inthe specification and defining the simulation method for the entire APIseparately. The above is based on a rough object hierarchy as follows:

Each of these bullets represents a set of objects. The resource representing an individual object lives at api/objects/OBJECTID. For example, api/sessions/SESSIONID. As much as is reasonable, one would expect to be able to GET (read), POST (create), PUT (update/amend), or DELETE (delete) any individual member of each of these object sets. Going through each of these objects to ask what it would mean to create, read, update, or delete that object may reveal holes in the existing API, some of which I have filled in above.