...
Resource | Method | Description/Payload schema/Response schema |
---|---|---|
api2/session | GET,POST,DELETE | Post parameter: token |
api2/users | GET | |
api2/users/USERID | GET | |
api2/user/messages | GET,POSTshould support/encourage a stream-based interface | Get parameter: tag (optional) - Post parameters: message, via (opt), pool (opt), realm (opt), metadata (opt), tags (opt), replyto (opt) |
api2/user/followees | GET | |
api2/user/followers | GET,POST | Post parameter: userId |
api2/user/followees/USERID | DELETE | |
api2/user/tracks | GET,POST | Post parameter: track (regex) |
api2/user/tracks/TRACKID | GET,DELETE | |
api2/user/actions | GET,POST | Post parameter: name, test, action |
api2/user/actions/ACTIONID | GET,PUT,DELETE | Put parameter: enabled (boolean) |
api2/messages/MESSAGEID | GET | |
api2/messages | GET,POST | |
api2/conversations/CONVERSATIONID | GET | |
api2/conversations/CONVERSATIONID/messages | GET,POST | |
api2/pools | GET,POST | |
api2/pools/POOLID | GET,DELETE | |
api2/pools/POOLID/users | GET,POST | Post parameters: realm, userId, permission |
api2/pools/POOLID/users/USERID | DELETE | |
api2/pools/POOLID/messages | GET,POST... |
One point to note is that many some HTTP clients do not currently support the "PUT" or "DELETE" methods, so these may have to be simulated through POST methods with an extra parameter. I think that because of the close mapping to resource verbs, is worth using these methods in the specification and defining the simulation method for the entire API separately.
...