接口分组
具体路径以仓库中的 controller 实现为准,本文给出分组与调用约定。
请求约定
- 使用 JSON 作为请求与响应格式。
- 列表接口统一支持分页参数。
- 管理接口需要携带认证令牌。
- 统一错误结构:
code、msg、data。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
公开端与管理端 REST 接口概览。
| 分组 | 前缀 | 说明 |
|---|---|---|
| 公开内容 | /api | 文章、分类、标签、归档、动态、评论 |
| 站点信息 | /api | 站点配置、友链、关于页 |
| 管理接口 | /admin | 内容管理、设置、日志与统计 |
| 认证接口 | /auth | 登录与令牌 |
具体路径以仓库中的 controller 实现为准,本文给出分组与调用约定。
code、msg、data。# 获取文章列表
curl "http://localhost:8090/api/blog?page=1&size=10"
# 获取站点信息
curl "http://localhost:8090/api/site"