快速定义: 现代 Web APIs 的标准协议。基于 HTTP,可预测,简单。
主要原则
基于资源: 每个数据都有唯一 URL。/users/123。
HTTP 动词: GET (读)、POST (创建)、PUT (更新)、DELETE (删除)。
无状态: 每个请求独立。
示例
GET /api/customers — 列出所有客户。
POST /api/customers — 创建新客户。
PUT /api/customers/45 — 更新客户 45。
DELETE /api/customers/45 — 删除客户 45。
Onremo 中的 REST
Onremo API 完全是 REST。Bearer token 认证,JSON 响应。