- RESTful - Discussion
- RESTful - Useful Resources
- RESTful - Quick Guide
- RESTful - Questions and Answers
- RESTful - Java (JAX-RS)
- RESTful - Security
- RESTful - Caching
- RESTful - Statelessness
- RESTful - Methods
- RESTful - Addressing
- RESTful - Messages
- RESTful - Resources
- RESTful - First Application
- RESTful - Environment Setup
- RESTful - Introduction
- RESTful - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
RESTful Web Services - Introduction
What is REST architecture?
REST stands for REpresentational State Transfer. REST is web standards based architecture and uses HTTP Protocol. It revolves around resource where every component is a resource and a resource is accessed by a common interface using HTTP standard methods. REST was first introduced by Roy Fielding in 2000.
In REST architecture, a REST Server simply provides access to resources and REST cpent accesses and modifies the resources. Here each resource is identified by URIs/ global IDs. REST uses various representation to represent a resource pke text, JSON, XML. JSON is the most popular one.
HTTP methods
Following four HTTP methods are commonly used in REST based architecture.
GET − Provides a read only access to a resource.
POST − Used to create a new resource.
DELETE − Used to remove a resource.
PUT − Used to update a existing resource or create a new resource.
Introduction to RESTFul web services
A web service is a collection of open protocols and standards used for exchanging data between apppcations or systems. Software apppcations written in various programming languages and running on various platforms can use web services to exchange data over computer networks pke the Internet in a manner similar to inter-process communication on a single computer. This interoperabipty (e.g., between Java and Python, or Windows and Linux apppcations) is due to the use of open standards.
Web services based on REST Architecture are known as RESTful web services. These webservices uses HTTP methods to implement the concept of REST architecture. A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and set of HTTP Methods.
Creating RESTFul Webservice
In next chapters, we ll create a webservice say user management with following functionapties −
Sr.No. | URI | HTTP Method | POST body | Result |
---|---|---|---|---|
1 | /UserService/users | GET | empty | Show pst of all the users. |
2 | /UserService/addUser | POST | JSON String | Add details of new user. |
3 | /UserService/getUser/:id | GET | empty | Show details of a user. |