A really good example of a RESTful API is the Yahoo Geocoder.
http://developer.yahoo.com/maps/rest/V1/geocode.htmlThe RESTful design pattern places all of the arguments in the URL string. You see this sort of thing all the time in web pages, and in fact the entire WWW is a RESTful design. Your web service script takes the information in the $_GET array and uses it to create the response, which can be XML, JSON, CSV, plain text, etc.
Each REST call is atomic - there are no login/logout sequences. You might choose HTTPS and some kind of API-Key authentication if you really wanted to.
Try these URLs to see how this works. Note that testing the RESTful web service is a simple as typing the arguments into the browser address bar.
http://www.laprbass.com/RAY_REST_get_last_name.phphttp://www.laprbass.com/RAY_REST_get_last_name.php?key=ABChttp://www.laprbass.com/RAY_REST_get_last_name.php?key=ABC&name=Fredhttp://www.laprbass.com/RAY_REST_get_last_name.php?key=ABC&name=RichardWithout too much effort you can transform this design to use different API keys for different client data models, to return an XML string, or look up information in a data base, etc.
Best regards, ~Ray