eli5: The difference between RESTful API and a Web API

104 views

eli5: The difference between RESTful API and a Web API

In: 6

3 Answers

Anonymous 0 Comments

REST is a design philosophy and Web is a deployment environment, so they’re actually independent. Your api can be either neither or both.

Web just means it’s accessible on the internet.

REST stands for representational state transfer, and basically means the API doesn’t change state a result of any request you make. Each request should get the same response regardless of what other requests happened before.

Anonymous 0 Comments

A Web API is any API used by services over the web.

A RESTful API is a web API following the REST methodology, or conforms to specific conditions.

Any time a service exchanges information in a standardized way over the internet that is a form of an API: Application Programming Interface. The service or website has a way for other programs or services to talk to it and get information, and that is an API.

REST is a specific form of an API, but generally RESTful api’s are stateless (Each request is made in vacuum and then forgotten), resources are ordered into clear hiearchies, typically use the HTTP verbs to tell the service what you want to do with the resource you requested (POST, GET, PUT, PATCH, and DELETE), and if you’re being particular about it the API is structured so that a program can navigate it without the manual simply by following hyperlinks that are included in the response.

Anonymous 0 Comments

Web API – usually designed to be internal, has no public documentation, and probably is a patchwork of duct tape and bubble gum to enable the web application to communicate with whatever is supplying the information for the web app to function.

RESTful API – meant to be consumed by third parties (or at least, different departments inside the company). Usually has solid documentation that conforms to a specific model (not always, but people try).

Its a difference between private and public. You can call a web API as a third party, but you’ll have to do a lot of investigative work to use it. RESTful APIs on the other hand are designed to be integrated into different applications.