[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Web Services API: URL naming proposal

>>>>> "John" == John Locke <..hidden..> writes:
    John> I'm starting to like /api/ or /rest/ for the path that
    John> identifies the web service. And also adding an API version
    John> number to that endpoint, so that it becomes possible to change
    John> the API in the future while still maintaining an old version
    John> (should the organization wish to...)

    John> On authentication, yes we can use http auth headers, but do we
    John> want to explicitly require a session token, too? We're
    John> starting to delve into OAuth -- which adds a layer of
    John> complexity but also can take away the need for the remote
    John> system to collect the password at all. This seems like a good
    John> option to support.

    John> So: I would suggest for login, something like:

    John> POST http://myhost/ledgersmb/api/1.3/user/login


Include "api" and the version number.
This is common in the rails community too.  Sometimes "v1.3" if it makes
object naming easier.

]       He who is tired of Weird Al is tired of life!           |  firewalls  [
]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net architect[
] ..hidden.. http://www.sandelman.ottawa.on.ca/ |device driver[
   Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
	               then sign the petition.