Rest_Restful Flashcards
is an architectural style for designing networked applications. It was introduced by Roy Fielding in his doctoral dissertation in 2000.
REST
Representational State Transfer
refers to web services or
APIs that are built adhering to the principles and constraints of REST.
RESTFUL
8 HTTP methods
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- TRACE
- OPTION
means that each request from a client to a server is independent of any other request.
Statelessness
means that the server retains information about the client’s state across multiple requests.
Statefulness
Characteristics of Statelessness
(idea lang)
- Independence
- Scalability
- Simplicity
- Reliability
Characteristics of Statefullness
(idea lang)
- Session Managament
- Complexity
- Scalability (both sila ng statelessness)
- User Experience
Retrieve data from a server.
GET
Submit data to be processed to a specified resource.
POST
Update a resource or create a new resource at a specified URL.
PUT
Remove a resource from the server.
DELETE
Partially update a resource.
PATCH
Retrieve the headers for a resource, without the response body.
HEAD
Describe the communication options for the target resource.
OPTIONS
Perform a message loop-back test along the path to the target resource.
TRACE
are issued by a server in response to a client’s request made to the server. They help to identify whether the request was successfully processed or if there were any errors.
HTTP status codes
These codes indicate that the request was received and understood and that the process is continuing.
Informational (1xx)
These codes indicate that the request was successfully received, understood, and accepted.
Success (2xx)
These codes indicate that the client must take additional action to complete the request.
Redirection (3xx)
These codes indicate that the client seems to have made an error.
Client Error (4xx)
These codes indicate that the server failed to fulfill a valid request.
Server Error (5xx)
is a string of characters used to identify a resource on the Internet.
Uniform Resource Identifier (URI)
Key Components of a URI (5):
- Scheme
- Authority
- Path
- Query
- Fragment
Tools develop and test REST APIs? (IDEs and Development Environments)
- Visual Studio Code
- Postman
- Insomnia
Tools develop and test REST APIs? (API Design and Documentation)
- Swagger/ OpenAPI Generator
- Apiary
Tools develop and test REST APIs? (Testing and Validation)
- JUnit/ TestNG
- Rest-Assured
Tools develop and test REST APIs? (Mock Servers)
- WireMock
- MockServer
Tools develop and test REST APIs? (Misc. Tools)
- Curl
- HTTPie
Tools develop and test REST APIs? (Integrated Solutions)
- Swagger UI/ Redoc
- Docker
are widely used across various industries and applications due to their simplicity, scalability, and flexibility.
REST APIs
Some real-world examples of APIs (just a few ideas lang)
- Facebook API
- Paypal API
- Shopify API
- Google Cloud API
- Booking.com API
- Coinbase API