1/14
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is an API Architecture?
API Architecture is the structural design and set of rules that ensure that different software systems can talk to each other reliably and securely.
What is REST?
REST is a set of rules that allows two computers to talk to each other using the same language that web browsers use to load pages.
What is REST for?
An architectural style for designing networked applications.
What does REST rely on?
It relies on a stateless, client-server communication protocol, almost always HTTP.
What does Stateless mean?
It does not store any information about the client's previous requests, each request is treated as a brand-new/independent interaction
What are the standard types of requests?
GET
POST
PUT/PATCH
DELETE
What is GET?
Retrieving a resource
What is POST?
Creating a new resource
What is PUT/PATCH?
Updating an existing resource
What is DELETE?
Removing a resource
How does REST look in practice? (Step 1)
The Request:
Your app sends a GET request
How does REST look in practice? (Step 2)
The Representation:
The server doesn't send you the actual database; it sends a "representation" of the data (usually a text format called JSON).
How does REST look in practice? (Step 3)
The Result:
Your phone receives a list of hotels, prices, and photos to show you.
What are the advantages of REST?
It is stateless, so knowledge of prior messages don't matter, simplifying communication between the client and server/
Separates client and server, so the implementation can be changed without impacting communication between the client and server.
What are the disadvantages of REST?
As REST is stateless, this means that each request must contain all the details required to understand the request. This can mean having to send large quantities of data in each request.
Limited standard request types. This can make implementing applications that do not fit into these standard request types very complex.
Can have performance issues due to having to make multiple requests to gather all required data.