Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
22 views5 pages

REST Vs RESTful API - What's The Difference - TheServerSide

The document explains the difference between REST and RESTful APIs, highlighting that REST is a design philosophy while RESTful refers to APIs that implement this philosophy. It outlines the six core principles of REST, including statelessness and the use of a uniform interface, and discusses the challenges developers face in adhering to these principles. The document also touches on HATEOAS as a requirement for full REST compliance, although it is rarely implemented in practice.

Uploaded by

bala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

REST Vs RESTful API - What's The Difference - TheServerSide

The document explains the difference between REST and RESTful APIs, highlighting that REST is a design philosophy while RESTful refers to APIs that implement this philosophy. It outlines the six core principles of REST, including statelessness and the use of a uniform interface, and discusses the challenges developers face in adhering to these principles. The document also touches on HATEOAS as a requirement for full REST compliance, although it is rarely implemented in practice.

Uploaded by

bala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

11/24/24, 2:08 PM REST vs RESTful API: What's the difference?

| TheServerSide

9 g
Home > Software development best practices and processes

REST vs RESTful API: What's f


the difference?
By Raghu Karan Adapala, Xennial Innovations Inc. Published: 15 Jul 2024

REST URLs and HTTP Verbs Explained: GET, POST, PUT, DELETE…
DELETE…

The key difference between the


terms REST versus RESTful is that
REST refers to a philosophy about
the architecture and design of web
services, while the term RESTful
refers to any API that properly
implements the REST philosophy.

What is REST?

https://www.theserverside.com/video/REST-vs-RESTful-API-Whats-the-difference#:~:text=The key difference between the,properly implements th… 1/5


11/24/24, 2:08 PM REST vs RESTful API: What's the difference? | TheServerSide

The term REST, which stands for representational state transfer, was coined by Roy
Fielding in his 2000 doctoral dissertation about how clients and servers should
communicate with each other across a network.

At the heart of REST are the following six core principles, or as they are more
technically called, REST constraints:

1. Request-response cycles should be stateless.

2. A well-defined interface separates client to server request-response cycles.

3. A layered system architecture hides any back-end implementations from the


client.

4. Servers should inform clients about cacheable responses to help optimize


performance.

5. Servers should offload complex processing to clients by asking them to run code
on demand.

6. APIs are invoked through a uniform interface that references resources through
URIs and operations through HTTP methods.

The italicized words in the numbered principles are the abbreviated terms often used
to refer to the six RESTful constraints.

REST and RESTful APIs


A RESTful API should conform as much as possible to the six REST constraints. It
certainly should not violate them.

A problem that developers and architects often encounter with RESTful APIs is that
the six REST constraints, especially the demand to use a uniform interface, can be
highly nuanced and challenging to fully implement.

https://www.theserverside.com/video/REST-vs-RESTful-API-Whats-the-difference#:~:text=The key difference between the,properly implements th… 2/5


11/24/24, 2:08 PM REST vs RESTful API: What's the difference? | TheServerSide

k RESTful APIs should build URIs around resources, and use headers and query
parameters as the HTTP protocol intended.

Nouns, verbs and well-formed URIs

At the very least, a RESTful API respects REST's uniform interface constraint in two
ways:

Using nouns in RESTful URIs to ensure web service operations work on


resources.

Using the HTTP verbs properly to perform operations on resources.

Compliance with resource-focused, RESTful URL naming conventions is fairly easy


to accomplish: Use nouns as endpoints in your URIs. However, using HTTP verbs
properly is a bit more complicated.

For example, to retrieve or


delete a resource through
w a RESTful API, use the
GET and DELETE HTTP
verbs. However, the
proper use of other HTTP
methods can be a
challenge. For example:

PUT operations can


idempotently create or
save known resources.

POST operations can

k RESTful APIs are expected to operate on resources by


using the HTTP protocol methods as they were
update or save resources
but is not idempotent.
intended.

PATCH operations can


idempotently update a known resource.

Running afoul of these nuanced rules about PUT, POST and PATCH operations
would put into question just how RESTful your API really is.

HATEOAS for full REST compliance


https://www.theserverside.com/video/REST-vs-RESTful-API-Whats-the-difference#:~:text=The key difference between the,properly implements th… 3/5
11/24/24, 2:08 PM REST vs RESTful API: What's the difference? | TheServerSide

Furthermore, REST and the uniform interface constraint demands support for
HATEOAS (hypermedia as the engine of application state), which is rarely
implemented.

HATEOAS insists that when a resource representation is delivered to a client, so


must be the various URIs that can be invoked to perform subsequent operations on
the resource.

Technically speaking, a RESTful API must implement HATEOAS to fully comply with
the REST constraints. This rarely occurs, though, and most people still consider an
API RESTful even if it does not implement the principles of HATEOAS.

When is a REST API RESTful?


It's rare for a RESTful API or web service to fully comply with REST's six
architectural constraints. However, most solution architects strive to respect the
HTTP protocol's methods. They use resource-based URLs, and create stateless and
cacheable endpoints that enable loose coupling between the client and the server.

If you attain this threshold, your APIs will be easily understood and consumed by
others, which is typically the main goal when creating web services. Most people will
consider your APIs RESTful -- although Roy Fielding might raise an eyebrow.

Karan Adapala is a full-stack developer, app architect and cloud enthusiast with
expertise in React, Node.js, TypeScript, Python, Docker, Terraform, Jenkins and Git.

Search App Architecture


Latest TechTarget
resources

APPLICATION ARCHITECTURE
A
2 Webhooks explained
simply, with examples
Webhooks make significant use of basic API
call mechanisms and set event triggers in a
SOFTWARE QUALITY
few clicks of a button -- all without the ...

CLOUD COMPUTING

https://www.theserverside.com/video/REST-vs-RESTful-API-Whats-the-difference#:~:text=The key difference between the,properly implements th… 4/5


11/24/24, 2:08 PM REST vs RESTful API: What's the difference? | TheServerSide

SECURITY

AWS
2 Managing complexity:
Event-driven architecture
explained
Event-driven architecture is complex, but so
are today's data challenges. Discover ways to
manage dynamic and distributed ...

About Us Contributors Guides

Editorial Ethics Policy Reprints Opinions

Meet The Editors Answers Photo Stories

Contact Us Definitions Quizzes

Advertisers E-Products Tips

Partner with Us Events Tutorials

Media Kit Features Videos

Corporate Site

All Rights Reserved, Copyright 2000 - 2024, TechTarget

Privacy Policy
Do Not Sell or Share My Personal Information

https://www.theserverside.com/video/REST-vs-RESTful-API-Whats-the-difference#:~:text=The key difference between the,properly implements th… 5/5

You might also like