Logo
Pattern

Discover published sets by community

Explore tens of thousands of sets crafted by our community.

RESTful API Principles

12

Flashcards

0/12

Still learning
StarStarStarStar

Self-descriptive Messages

StarStarStarStar

RESTful API messages are self-descriptive, meaning they contain all the information needed to understand the request or response. This is typically achieved through the use of HTTP headers and status codes. Example: Content-Type header indicating the format of the message body.

StarStarStarStar

HATEOAS (Hypermedia As The Engine Of Application State)

StarStarStarStar

HATEOAS is a constraint of RESTful APIs which enables the client to dynamically navigate to various resource states of the application through hyperlinks. Example: Response contains links to other actions related to the resource.

StarStarStarStar

Layered System

StarStarStarStar

A Layered System is a REST principle where a client interacts with an API without knowing the inner layers of the network system. This allows for scalability and management enhancements. Example: A client uses a REST API without knowing if there's a load balancer.

StarStarStarStar

Code on Demand (optional)

StarStarStarStar

Code on Demand is an optional principle of RESTful APIs allowing the server to extend client functionality by sending code to the client that can be executed. Example: JavaScript code sent with a response, executed by the client.

StarStarStarStar

Resource-Based URLs

StarStarStarStar

Resource-Based URLs in RESTful APIs refer to URLs that are organized according to the system's data architecture, allowing intuitive access and manipulation of resources. Example: GET /orders/ for accessing orders; POST /orders/ to create a new order.

StarStarStarStar

Idempotence

StarStarStarStar

In RESTful APIs, an idempotent HTTP method means that, no matter how many times it's called, the result remains the same on the server. Example: DELETE and PUT requests should be idempotent.

StarStarStarStar

Statelessness

StarStarStarStar

In RESTful APIs, statelessness means that each HTTP request from a client contains all the information needed to process the request. The server does not store anything about the user's state. Example: A client provides authentication credentials with each request.

StarStarStarStar

Cacheability

StarStarStarStar

Cacheability is a principle whereby RESTful APIs are designed to support caching of responses. This can reduce the need for repeated server-side processing and improve performance. Example: A web application caches GET requests for user profiles.

StarStarStarStar

Resource Identification in Requests

StarStarStarStar

Resources are identified using URIs in RESTful APIs, providing a simple way for clients to point to a specific item within a dataset. Example: Accessing a user with GET /users/123

StarStarStarStar

Resource Manipulation through Representations

StarStarStarStar

Clients interact with RESTful APIs by exchanging representations of resources, such as JSON or XML, which capture the current or intended state of those resources. Example: Updating a user's profile using a JSON representation with a PUT request.

StarStarStarStar

Client-Server Architecture

StarStarStarStar

In RESTful APIs, a client-server architecture separates client concerns from server concerns. Clients handle the user interface while servers handle data storage and processing. Example: A mobile app (client) communicates with a REST API (server) to fetch data.

StarStarStarStar

Uniform Interface

StarStarStarStar

Uniform Interface is a REST principle that simplifies the architecture and decouples the client from the server. It involves using standardized operations like HTTP verbs (GET, POST, PUT, DELETE). Example: Accessing resources with URIs and manipulating them via HTTP methods.

Know
0
Still learning
Click to flip
Know
0
Logo

© Hypatia.Tech. 2024 All rights reserved.