<s>
Representational	B-Protocol
state	I-Protocol
transfer	I-Protocol
(	O
REST	O
)	O
is	O
a	O
software	O
architectural	O
style	O
that	O
describes	O
the	O
architecture	O
of	O
the	O
Web	O
.	O
</s>
<s>
A	O
system	O
that	O
complies	O
with	O
some	O
or	O
all	O
of	O
these	O
constraints	O
is	O
loosely	O
referred	O
to	O
as	O
RESTful	B-Protocol
.	O
</s>
<s>
Although	O
REST	O
is	O
the	O
architecture	O
of	O
the	O
Web	O
,	O
it	O
has	O
not	O
been	O
widely	O
employed	O
throughout	O
the	O
software	O
industry	O
as	O
the	O
architecture	O
for	O
Web	O
services	O
APIs	B-Application
.	O
</s>
<s>
The	O
term	O
representational	B-Protocol
state	I-Protocol
transfer	I-Protocol
was	O
introduced	O
and	O
defined	O
in	O
2000	O
by	O
Roy	O
Fielding	O
in	O
his	O
doctoral	O
dissertation	O
.	O
</s>
<s>
It	O
means	O
that	O
a	O
server	O
will	O
respond	O
with	O
the	O
representation	O
of	O
a	O
resource	O
(	O
today	O
,	O
it	O
will	O
most	O
often	O
be	O
an	O
HTML	B-Language
,	O
XML	B-Protocol
or	O
JSON	B-General_Concept
document	O
)	O
and	O
that	O
resource	O
will	O
contain	O
hypermedia	O
links	O
that	O
can	O
be	O
followed	O
to	O
make	O
the	O
state	O
of	O
the	O
system	O
change	O
.	O
</s>
<s>
This	O
means	O
that	O
those	O
identifiers	O
can	O
change	O
without	O
the	O
need	O
to	O
inform	O
the	O
client	O
beforehand	O
and	O
that	O
there	O
can	O
be	O
only	O
loose	B-Application
coupling	I-Application
between	O
client	O
and	O
server	O
.	O
</s>
<s>
For	O
instance	O
,	O
several	O
experimental	O
extensions	O
had	O
been	O
added	O
to	O
the	O
communication	O
protocol	O
(	O
HTTP	B-Protocol
)	O
to	O
support	O
proxies	O
,	O
and	O
more	O
extensions	O
were	O
being	O
proposed	O
,	O
but	O
there	O
was	O
a	O
need	O
for	O
a	O
formal	O
Web	O
architecture	O
with	O
which	O
to	O
evaluate	O
the	O
impact	O
of	O
these	O
changes	O
.	O
</s>
<s>
The	O
W3C	O
and	O
IETF	O
working	O
groups	O
together	O
started	O
work	O
on	O
creating	O
formal	O
descriptions	O
of	O
the	O
Web	O
’s	O
three	O
primary	O
standards	O
:	O
URI	B-Protocol
,	O
HTTP	B-Protocol
,	O
and	O
HTML	B-Language
.	O
</s>
<s>
Roy	O
Fielding	O
was	O
involved	O
in	O
the	O
creation	O
of	O
these	O
standards	O
(	O
specifically	O
HTTP1.0	O
and	O
1.1	O
,	O
and	O
URI	B-Protocol
)	O
,	O
and	O
during	O
the	O
next	O
six	O
years	O
he	O
created	O
the	O
REST	O
architectural	O
style	O
,	O
testing	O
its	O
constraints	O
on	O
the	O
Web	O
’s	O
protocol	O
standards	O
and	O
using	O
it	O
as	O
a	O
means	O
to	O
define	O
architectural	O
improvements	O
—	O
and	O
to	O
identify	O
architectural	O
mismatches	O
.	O
</s>
<s>
He	O
also	O
surveyed	O
many	O
existing	O
architectural	O
styles	O
for	O
network-based	O
applications	O
,	O
identifying	O
which	O
features	O
are	O
shared	O
with	O
other	O
styles	O
,	O
such	O
as	O
caching	B-General_Concept
and	O
client	B-Operating_System
–	I-Operating_System
server	I-Operating_System
features	O
,	O
and	O
those	O
which	O
are	O
unique	O
to	O
REST	O
,	O
such	O
as	O
the	O
concept	O
of	O
resources	O
.	O
</s>
<s>
For	O
example	O
,	O
Fielding	O
identified	O
the	O
embedding	O
of	O
session	O
information	O
in	O
URIs	B-Protocol
as	O
a	O
violation	O
of	O
the	O
constraints	O
of	O
REST	O
which	O
can	O
negatively	O
affect	O
shared	O
caching	B-General_Concept
and	O
server	O
scalability	B-Architecture
.	O
</s>
<s>
HTTP	B-Application
cookies	I-Application
also	O
violated	O
REST	O
constraints	O
because	O
they	O
can	O
become	O
out	O
of	O
sync	O
with	O
the	O
browser	O
's	O
application	O
state	O
,	O
making	O
them	O
unreliable	O
;	O
they	O
also	O
contain	O
opaque	O
data	O
that	O
can	O
be	O
a	O
concern	O
for	O
privacy	O
and	O
security	B-Application
.	O
</s>
<s>
The	O
REST	O
architectural	O
style	O
is	O
designed	O
for	O
network-based	O
applications	O
,	O
specifically	O
client-server	B-Operating_System
applications	O
.	O
</s>
<s>
But	O
more	O
than	O
that	O
,	O
it	O
is	O
designed	O
for	O
Internet-scale	O
usage	O
,	O
so	O
the	O
coupling	O
between	O
the	O
user	O
agent	O
(	O
client	O
)	O
and	O
the	O
origin	O
server	O
must	O
be	O
as	O
loose	B-Application
as	O
possible	O
to	O
facilitate	O
large-scale	O
adoption	O
.	O
</s>
<s>
The	O
strong	O
decoupling	O
of	O
client	O
and	O
server	O
together	O
with	O
the	O
text-based	O
transfer	O
of	O
information	O
using	O
a	O
uniform	O
addressing	O
protocol	O
provided	O
the	O
basis	O
for	O
meeting	O
the	O
requirements	O
of	O
the	O
Web	O
:	O
robustness	O
(	O
anarchic	O
scalability	B-Architecture
)	O
,	O
independent	O
deployment	O
of	O
components	O
,	O
large-grain	O
data	O
transfer	O
,	O
and	O
a	O
low	O
entry-barrier	O
for	O
content	O
readers	O
,	O
content	O
authors	O
and	O
developers	O
alike	O
.	O
</s>
<s>
scalability	B-Architecture
allowing	O
the	O
support	O
of	O
large	O
numbers	O
of	O
components	O
and	O
interactions	O
among	O
components	O
;	O
</s>
<s>
When	O
these	O
constraints	O
are	O
applied	O
to	O
the	O
system	O
architecture	O
,	O
it	O
gains	O
desirable	O
non-functional	O
properties	O
,	O
such	O
as	O
performance	O
,	O
scalability	B-Architecture
,	O
simplicity	O
,	O
modifiability	O
,	O
visibility	O
,	O
portability	O
,	O
and	O
reliability	O
.	O
</s>
<s>
The	O
client-server	B-Operating_System
design	O
pattern	O
enforces	O
the	O
principle	O
of	O
separation	O
of	O
concerns	O
:	O
separating	O
the	O
user	O
interface	O
concerns	O
from	O
the	O
data	O
storage	O
concerns	O
.	O
</s>
<s>
Separation	O
also	O
simplifies	O
the	O
server	O
components	O
,	O
improving	O
scalability	B-Architecture
,	O
but	O
more	O
importantly	O
it	O
allows	O
components	O
to	O
evolve	O
independently	O
(	O
anarchic	O
scalability	B-Architecture
)	O
,	O
which	O
is	O
necessary	O
in	O
an	O
Internet-scale	O
environment	O
that	O
involves	O
multiple	O
organisational	O
domains	O
.	O
</s>
<s>
In	O
computing	O
,	O
a	O
stateless	B-Protocol
protocol	I-Protocol
is	O
a	O
communications	O
protocol	O
in	O
which	O
no	O
session	O
information	O
is	O
retained	O
by	O
the	O
receiver	O
,	O
usually	O
a	O
server	O
.	O
</s>
<s>
This	O
property	O
of	O
stateless	B-Protocol
protocols	I-Protocol
makes	O
them	O
ideal	O
in	O
high	O
volume	O
applications	O
,	O
increasing	O
performance	O
by	O
removing	O
server	O
load	O
caused	O
by	O
retention	O
of	O
session	O
information	O
.	O
</s>
<s>
As	O
on	O
the	O
World	O
Wide	O
Web	O
,	O
clients	O
and	O
intermediaries	O
can	O
cache	B-General_Concept
responses	O
.	O
</s>
<s>
Well-managed	O
caching	B-General_Concept
partially	O
or	O
completely	O
eliminates	O
some	O
client	B-Operating_System
–	I-Operating_System
server	I-Operating_System
interactions	O
,	O
further	O
improving	O
scalability	B-Architecture
and	O
performance	O
.	O
</s>
<s>
The	O
cache	B-General_Concept
can	O
be	O
performed	O
at	O
the	O
client	O
machine	O
in	O
memory	O
or	O
browser	O
cache	B-General_Concept
storage	O
.	O
</s>
<s>
Additionally	O
cache	B-General_Concept
can	O
be	O
stored	O
in	O
a	O
Content	O
Delivery	O
Network	O
(	O
CDN	O
)	O
.	O
</s>
<s>
If	O
a	O
proxy	B-Application
or	O
load	B-Application
balancer	I-Application
is	O
placed	O
between	O
the	O
client	O
and	O
server	O
,	O
it	O
wo	O
n't	O
affect	O
their	O
communications	O
,	O
and	O
there	O
wo	O
n't	O
be	O
a	O
need	O
to	O
update	O
the	O
client	O
or	O
server	O
code	O
.	O
</s>
<s>
Intermediary	O
servers	O
can	O
improve	O
system	O
scalability	B-Architecture
by	O
enabling	O
load	B-Application
balancing	I-Application
and	O
by	O
providing	O
shared	O
caches	B-General_Concept
.	O
</s>
<s>
Also	O
,	O
security	B-Application
can	O
be	O
added	O
as	O
a	O
layer	O
on	O
top	O
of	O
the	O
web	O
services	O
,	O
separating	O
business	O
logic	O
from	O
security	B-Application
logic	O
.	O
</s>
<s>
Adding	O
security	B-Application
as	O
a	O
separate	O
layer	O
enforces	O
security	B-Application
policies	O
.	O
</s>
<s>
Servers	O
can	O
temporarily	O
extend	O
or	O
customize	O
the	O
functionality	O
of	O
a	O
client	O
by	O
transferring	O
executable	O
code	O
:	O
for	O
example	O
,	O
compiled	O
components	O
such	O
as	O
Java	B-Application
applets	I-Application
,	O
or	O
client-side	B-Operating_System
scripts	O
such	O
as	O
JavaScript	B-Language
.	O
</s>
<s>
The	O
uniform	O
interface	O
constraint	O
is	O
fundamental	O
to	O
the	O
design	O
of	O
any	O
RESTful	B-Protocol
system	O
.	O
</s>
<s>
Resource	O
identification	O
in	O
requests	O
-	O
Individual	O
resources	O
are	O
identified	O
in	O
requests	O
,	O
for	O
example	O
using	O
URIs	B-Protocol
in	O
RESTful	B-Protocol
Web	I-Protocol
services	I-Protocol
.	O
</s>
<s>
For	O
example	O
,	O
the	O
server	O
could	O
send	O
data	O
from	O
its	O
database	O
as	O
HTML	B-Language
,	O
XML	B-Protocol
or	O
as	O
JSON	B-General_Concept
—	O
none	O
of	O
which	O
are	O
the	O
server	O
's	O
internal	O
representation	O
.	O
</s>
<s>
For	O
example	O
,	O
which	O
parser	O
to	O
invoke	O
can	O
be	O
specified	O
by	O
a	O
media	B-Application
type	I-Application
.	O
</s>
<s>
Hypermedia	B-Operating_System
as	I-Operating_System
the	I-Operating_System
engine	I-Operating_System
of	I-Operating_System
application	I-Operating_System
state	I-Operating_System
(	O
HATEOAS	B-Operating_System
)	O
-	O
Having	O
accessed	O
an	O
initial	O
URI	B-Protocol
for	O
the	O
REST	O
application	O
—	O
analogous	O
to	O
a	O
human	O
Web	O
user	O
accessing	O
the	O
home	O
page	O
of	O
a	O
website	O
—	O
a	O
REST	O
client	O
should	O
then	O
be	O
able	O
to	O
use	O
server-provided	O
links	O
dynamically	O
to	O
discover	O
all	O
the	O
available	O
resources	O
it	O
needs	O
.	O
</s>
<s>
Web	O
service	O
APIs	B-Application
that	O
adhere	O
to	O
the	O
REST	O
architectural	O
constraints	O
are	O
called	O
RESTful	B-Protocol
APIs	I-Protocol
.	O
</s>
<s>
HTTP-based	O
RESTful	B-Protocol
APIs	I-Protocol
are	O
defined	O
with	O
the	O
following	O
aspects	O
:	O
</s>
<s>
Unlike	O
SOAP-based	O
web	O
services	O
,	O
there	O
is	O
no	O
"	O
official	O
"	O
standard	O
for	O
RESTful	B-Protocol
web	O
APIs	B-Application
.	O
</s>
<s>
This	O
is	O
because	O
REST	O
is	O
an	O
architectural	O
style	O
,	O
while	O
SOAP	B-Application
is	O
a	O
protocol	O
.	O
</s>
<s>
REST	O
is	O
not	O
a	O
standard	O
in	O
itself	O
,	O
but	O
RESTful	B-Protocol
implementations	O
make	O
use	O
of	O
standards	O
,	O
such	O
as	O
HTTP	B-Protocol
,	O
URI	B-Protocol
,	O
JSON	B-General_Concept
,	O
and	O
XML	B-Protocol
.	O
</s>
<s>
Many	O
developers	O
describe	O
their	O
APIs	B-Application
as	O
being	O
RESTful	B-Protocol
,	O
even	O
though	O
these	O
APIs	B-Application
do	O
not	O
fulfill	O
all	O
of	O
the	O
architectural	O
constraints	O
described	O
above	O
(	O
especially	O
the	O
uniform	O
interface	O
constraint	O
)	O
.	O
</s>
<s>
Most	O
APIs	B-Application
claiming	O
to	O
be	O
RESTful	B-Protocol
actually	O
only	O
satisfy	O
the	O
level	O
2	O
of	O
the	O
Richardson	O
Maturity	O
Model	O
.	O
</s>
