English
[Interview Question] What is a RESTful API?

[Interview Question] What is a RESTful API?

Organize interview questions about RESTful APIs

RESTful API

Refers to a RESTful API.

It's pretty self-explanatory, but it is what it sounds like! So let's take a look at what each word means, and you'll see what a RESTful API is all about.

API

Short for Application Programming Interface. A mechanism that allows two software components to communicate with each other using a set of definitions and protocols.

This is how I define it. The way I understand it is that different components of software have different ways of dealing with objects and so on, and to deal with this disparity, a convention is established so that they can communicate and interact with each other.

REST

Representational State Transfer. One of the software architectures for distributed hypermedia systems such as the World Wide Web.

REST was initially created as a guideline for managing communication in complex networks such as the Internet, and is said to be reliable for large-scale communication and easy to implement and modify.

Principles of REST Architecture

  • Uniform Interface

    • Server sends information in a standardized format

    • The standard format may differ from the internal representation of the resource on the server

    • All API requests for the same resource are the same regardless of the specific language, platform, etc.

  • Stateless

    • Each request is independent of all other requests

    • Server can fully understand and fulfill the request without additional information

  • Layered System

    • Multiple applications working together to fulfill client requests

    • Multiple tiers of servers, where different authorized intermediaries may exist between the server and the client

    • Additional intermediaries such as proxies and gateways, encryption, load-balancing layers, etc.

    • Remains invisible to the client

  • Cacheable (Cacheable)

    • Supports caching to store some responses to improve server response times

    • Implements caching on the client or server side

  • On Demand Code (On Demand Code)

    • Deliver resources that are typically static

    • Includes executable code in responses on demand, allowing you to temporarily extend or customize client functionality

Benefits of using RESTful APIs

  • Scalability

    • Scalable because it optimizes client-server interactions
  • Flexibility

    • Supports full client-server separation

    • Simplify & separate server components so each part can evolve independently

  • Independence

    • Independent of the technology used

    • Ability to write client & server applications using different programming languages and change technologies, regardless of API design

Summary

What is RESTful API? It refers to an application programming interface using REST architecture, which is a convention that organizes the interaction between programs that adhere to the principles of REST architecture.

So what are the benefits? The benefits of using these APIs are scalability, flexibility, and independence!

See also.

[[AWS] What are RESTful APIs?"(https://aws.amazon.com/ko/what-is/restful-api/)

댓글 작성

게시글에 대한 의견을 남겨 주세요.

댓글 0