REST API
Embed This Widget
Add the script tag and a data attribute to embed this widget.
Embed via iframe for maximum compatibility.
<iframe src="https://ipfyi.com/iframe/glossary/rest-api/" width="420" height="400" frameborder="0" style="border:0;border-radius:10px;max-width:100%" loading="lazy"></iframe>
Paste this URL in WordPress, Medium, or any oEmbed-compatible platform.
https://ipfyi.com/glossary/rest-api/
Add a dynamic SVG badge to your README or docs.
[](https://ipfyi.com/glossary/rest-api/)
Use the native HTML custom element.
Tanım
Temsil Edilebilir Durum Transferi Uygulama Programlama Arayüzü. URL'ler tarafından tanımlanan kaynakları işlemek için standart HTTP yöntemleri (GET, POST, PUT, DELETE) ve durumsuz iletişim kullanan web hizmetleri için mimari stil.
The Six REST Constraints
REST (Representational State Transfer) is an architectural style defined by six constraints: client-server separation, statelessness, cacheability, a uniform interface, a layered system, and optional code-on-demand. Statelessness is the most operationally significant: every HTTPHypertext Transfer Protocol. The application-layer protocol for transmitting web pages, APIs, and other resources. HTTP defines methods (GET, POST, PUT, DELETE) and status codes for client-server communication. request must carry all the information needed to process it — no server-side session state. This makes REST services horizontally scalable because any server behind a Load BalancerA device or service that distributes incoming network traffic across multiple backend servers to ensure no single server is overwhelmed. Improves availability, reliability, and scalability of web applications. can handle any request without shared memory.
Resources, Verbs, and Status Codes
REST models everything as a resource identified by a URI. HTTP verbs carry semantic meaning: GET retrieves without side effects, POST creates, PUT replaces, PATCH partially updates, DELETE removes. HTTP Status CodesThree-digit codes returned by a web server indicating the result of a request. Organized into classes: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client error), and 5xx (server error). communicate outcomes — 200 for success, 201 when a resource is created, 404 when it does not exist, 422 when the request body fails validation. Well-designed APIs use these codes consistently so clients can handle errors programmatically without parsing error messages.
REST and the Network Layer
REST APIs travel over standard HTTPSHTTP Secure. The encrypted version of HTTP that uses TLS to protect data in transit between a browser and a web server. Identified by the padlock icon in browsers and the https:// URL scheme. connections, which means they benefit automatically from CDNContent Delivery Network. A geographically distributed network of servers that caches and serves content from locations close to end users, reducing latency and improving load times. Major providers include Cloudflare, AWS CloudFront, and Akamai. caching for GET responses with appropriate Cache-Control headers. CORSCross-Origin Resource Sharing. A browser security mechanism that uses HTTP headers to control which origins (domains) are permitted to access resources from another origin. Essential for modern web APIs that serve cross-domain requests. headers control which browser origins may call an API cross-site. For real-time bidirectional communication REST falls short, and developers often pair a REST API with a WebSocketA communication protocol that provides full-duplex, persistent connections between a browser and server over a single TCP connection. Ideal for real-time applications like chat, live dashboards, and multiplayer games. endpoint for push notifications or live data feeds.