What is "rest"
REST (RE State Transfer) is an architecture style that uses resource identification, resource manipulation through representations; self-descriptive messages and hypermedia such as the engine application status, to build distributed systems that are scalable and flexible.
REST is an architecture style for designing network applications. The idea is that instead of using complex mechanisms such as CORBA, RPC or SOAP to connect between machines, pure HTTP is used to make calls between machines.
The term was introduced and defined in 2000 by Roy Fielding in his doctoral thesis. Fielding is one of the main authors of Hypertext Transfer Protocol (HTTP) versions of the 1.0 and 1.1 specification.
Resources
- Transfer of representational status, on Wikipedia,
- Architectural Styles and Network-Based Software Architectures Design, the introduction of Fielding’s REST dissertation, and his clarification regarding the necessary use of hypertext in Apis REST
- REST implementation in Google Code.
- How to get a cup of coffee
Examples
A Restful website api is consulted to find out information about a user, specified by a numeric ID.
Request Type: GET
http://www.api.website.com/users/12345
Returns, in a json format for this example:
{ "username ": " theuser " ,
"userid " : 12345,
" primeiro ": " George " ,
"último ": " Washington "}