views:

154

answers:

2

I would like to create an API. I would like it to be a REST API. However, I don't know the first thing about creating an API. Especially one that involves authentication. I'm looking for a guide that can help me understand how and why I should build my API a certain way.

A: 

as far as i know.. using rest there is no restriction of HOW to build a REST API, i mean, it's really up to you. I've seen web services that use XML,JSON and even there are some of them work directly on JS.

The idea of an API is that any program could use the services that you're publishing. Since REST uses the HTTP protocol, you can use the basic http authentication (session cookies and all that stuff), although sometimes web services use a public/private key instead

I'd say that the best guide when creating an API is to learn how to use another one .. the web services proposed by flickr are a good start... but if you really need something more exact, there are always good books about it

Good luck and have fun!

pleasedontbelong
There are some very specific constraints to how you should build a REST api. e.g. It must be stateless, therefore, no session cookies.
Darrel Miller
+1  A: 

Your question is very broad. There are lots of questions here about building RESTful systems. Read some and try and ask more specific questions and we will try and help.

See the REST Tag Wiki for links to useful resources.

Darrel Miller
There are loads of references to this topic on SO: try: http://stackoverflow.com/questions/551933/can-you-explain-the-web-concept-of-restful
petert