使用 curl 与 API Token 管理博客(Agent 实操)
Agent 可操作性
本博客所有后台能力都暴露为 HTTP API,支持 Authorization: Bearer <API_TOKEN>。
创建一篇文章:
curl -X POST http://localhost:8790/api/posts \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"新文章","content":"正文","status":"published","tags":["测试"]}'
这是 Agent 像人一样操作系统的地基。