Web APIs and Services
Sami Rollins
Web Service
A web service is a software system designed to support interoperable machine-to-machine interaction over a network.
— W3C, Web Services Glossary[1]
A web site serves HTML pages designed for human consumption. A web service (or API) serves content intended for consumption by a machine.
Web API
Web 2.0 Web APIs often use machine-based interactions such as REST and SOAP. RESTful web APIs are typically loosely based on HTTP methods to access resources via URL-encoded parameters and the use of JSON or XML to transmit data. By contrast, SOAP protocols are standardized by the W3C and mandate the use of XML as the payload format, typically over HTTP
SOAP
REpresentational State Transfer (REST)
Pure (original) REST
Using a web API
RESTful or Not RESTful
POST /api/createUser
POST /api/updateUser
GET /api/findUser
RESTful or Not RESTful
POST /api/createUser
POST /api/updateUser
GET /api/findUser
POST /api/users/create
GET /api/users/{id}/find
POST /api/users/{id}/update
RESTful or Not RESTful
POST /api/users/create
GET /api/users/{id}/find
POST /api/users/{id}/update
POST /api/users
PUT /api/users/{id}
GET /api/users/{id}