01 · What is it?
A REST API is a common style for designing web APIs.
It usually represents business data as resources and uses HTTP methods to perform actions on those resources.
Simple Definition:
A REST API organizes API operations around resources.
02 · Think of it like...
Think of an API resource as a collection of business objects.
Orders
Customers
Products
Each resource has an address and common actions.
OrdersA collection of business objects
→
Common actions- Get Orders
- Create Order
- Update Order
- Delete Order
03 · What does it do?
A REST API commonly uses these HTTP methods to work with resources.
GETRetrieve
POSTCreate
PUTReplace
PATCHPartially update
DELETERemove
04 · Where is it used?
REST APIs are commonly used in:
Web Applications
Mobile Applications
Business Systems
Cloud Services
System Integrations
05 · Example
GET /api/ordersRetrieve orders.
GET /api/orders/1001Retrieve one order.
POST /api/ordersCreate an order.
PATCH /api/orders/1001Update part of an order.
DELETE /api/orders/1001Delete an order.
These examples show the design pattern. They are not implementation code.
06 · How it connects
Resource→Endpoint→HTTP Method→Backend Action
Orders→/api/orders→POST→Create Order
REST APIs combine resource-oriented URLs with HTTP methods.
07 · Do Not Confuse
API
The broader concept of a software interface.
REST API
One common way to design a web API.
REST is an API design style.
Not every API is REST.
08 · Topic Glossary
| English Term | 中文 | Simple English | 中文小白理解 |
| REST API | REST API | A common way to design web APIs around resources. | 一种以资源为中心设计 Web API 的常见方式。 |
| Resource | 资源 | A business object or data exposed through an API. | API 中可以被访问和操作的数据或业务对象。 |
| Endpoint | 接口地址 | A specific URL used to access a resource. | 用来访问某个 API 资源的具体地址。 |
| GET | 获取 | Usually used to retrieve a resource. | 通常用于获取资源数据。 |
| POST | 创建 / 提交 | Usually used to create a new resource. | 通常用于创建新的资源。 |
| PUT | 完整更新 | Usually used to replace a resource. | 通常用于完整替换一个资源。 |
| PATCH | 部分更新 | Usually used to change part of a resource. | 通常用于修改资源的一部分。 |
| DELETE | 删除 | Usually used to remove a resource. | 通常用于删除一个资源。 |
| HTTP | HTTP 协议 | The protocol commonly used by REST APIs. | REST API 常用的基础通信协议。 |
| JSON | JSON 数据格式 | A common format for REST API data. | REST API 常用的数据交换格式。 |
09 · What to Remember
REST API is one common API design style.
REST APIs organize operations around resources.
HTTP methods describe what action should be performed.
Final:
Resource + Endpoint + HTTP Method = REST API Operation