Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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: *

  • ESME API instance (api/)

      ...

        • Sessions (api/sessions)

      ...

        • Users (api/users)

          ...

              • Messages posted by a user (api/users/USERID/messages)

          ...

              • Users followed by a user (api/users/USERID/followees)

          ...

              • Users following a user (api/users/USERID/followers)

          ...

              • Trackers belonging to a user (api/users/USERID/tracks)

          ...

              • Actions belonging to a user (api/users/USERID/actions)

          ...

            • Messages (api/messages)

          ...

            • Tags (api/tags)

          ...

            • Conversations (api/conversations)

          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.