Difference between revisions of "What is REST, REST API?"

From ScenarioThinking
Jump to navigation Jump to search
 
Line 1: Line 1:
REST was introduced by Roy Fielding to describe the web architecture. REST stands for Representational State Transfer.
'''REST''' was introduced by Roy Fielding to describe the web architecture. REST stands for Representational State Transfer.


Web comprises of various resources. A resources is any item of interest that has an URI. Using URI (eg: http://www.example.com/test.html), a "representation" of a resource is returned (test.html). The representation places the client application in a "state". Through the hyperlink, another resource is accessed and the new representation places the client application into a new state. Thus the client "transfers" the state with each resource representation.
 
Web comprises of various resources. A resource is any item of interest that has an URI. Using URI (eg: http://www.example.com/test.html) a "representation" of a resource is returned (test.html). The representation places the client application in a "state". Through the hyperlink, another resource is accessed and the new representation places the client application into a new state. Thus the client "transfers" the state with each resource representation.




Line 8: Line 9:
* URL
* URL
* XML/HTML/GIF/JPEG/etc (Resource Representations)
* XML/HTML/GIF/JPEG/etc (Resource Representations)
* text/xml, text/html, image/gif, image/jpeg, etc (MIME Types)"
* text/xml, text/html, image/gif, image/jpeg, etc (MIME Types)" (source:[http://www.xfront.com/REST-Web-Services.html] )
( source:[http://www.xfront.com/REST-Web-Services.html] )
 
 
In a nutshell, REST is a web architecture in which the client submits an HTTP request to a specified URL.  The response contains data mostly in XML format.
 
 
'''REST API's''':
 
REST API's are designed to interact with the web servers using a simple URL over HTTP and the response are returned in XML format.
 
Here is an example of a call that uses the REST API of "ebay":
 
http://rest.api.ebay.com/restapi?CallName=GetSearchResults&RequestToken=xyz123&RequestUserId=ebayuser&Query=toy%20boat&Schema=1
 
This REST API will provide data in response to a request in an XML format that they support.




Reference:
'''Reference:'''


http://webservices.xml.com/pub/a/ws/2003/09/30/soa.html
http://webservices.xml.com/pub/a/ws/2003/09/30/soa.html

Latest revision as of 21:26, 7 June 2006

REST was introduced by Roy Fielding to describe the web architecture. REST stands for Representational State Transfer.


Web comprises of various resources. A resource is any item of interest that has an URI. Using URI (eg: http://www.example.com/test.html) a "representation" of a resource is returned (test.html). The representation places the client application in a "state". Through the hyperlink, another resource is accessed and the new representation places the client application into a new state. Thus the client "transfers" the state with each resource representation.


"REST is not a standard but uses the following standards:

  • HTTP
  • URL
  • XML/HTML/GIF/JPEG/etc (Resource Representations)
  • text/xml, text/html, image/gif, image/jpeg, etc (MIME Types)" (source:[1] )


In a nutshell, REST is a web architecture in which the client submits an HTTP request to a specified URL. The response contains data mostly in XML format.


REST API's:

REST API's are designed to interact with the web servers using a simple URL over HTTP and the response are returned in XML format.

Here is an example of a call that uses the REST API of "ebay":

http://rest.api.ebay.com/restapi?CallName=GetSearchResults&RequestToken=xyz123&RequestUserId=ebayuser&Query=toy%20boat&Schema=1

This REST API will provide data in response to a request in an XML format that they support.


Reference:

http://webservices.xml.com/pub/a/ws/2003/09/30/soa.html

http://naeblis.cx/rtomayko/2004/12/12/rest-to-my-wife

http://en.wikipedia.org/wiki/Representational_State_Transfer

http://developer.ebay.com/developercenter/rest