站点状态接口

一个不需要密钥的状态接口。

GET /api/status.json · 允许跨域 · 只读

唯一一个端点

打开状态 JSON · GET /api/status.json

返回站点当前版本、更新时间、四个入口和文章索引。它是一个静态 JSON 文件,由 CDN 直接返回,没有后端、没有鉴权、没有速率限制(也请不要压它)。

返回示例

{
  "site": "asibeam",
  "version": "2026.12.03",
  "status": "live",
  "updated": "2026-12-03T21:29:54+08:00",
  "timezone": "Asia/Shanghai",
  "surfaces": [
    { "name": "blog", "title": "写作", "url": "https://www.asibeam.com/blog/" },
    { "name": "app",  "title": "工具", "url": "https://www.asibeam.com/app/"  },
    { "name": "docs", "title": "文档", "url": "https://www.asibeam.com/docs/" },
    { "name": "api",  "title": "接口", "url": "https://www.asibeam.com/api/"  }
  ],
  "posts": [
    {
      "id": "hello-asibeam",
      "title": "开灯",
      "url": "https://www.asibeam.com/blog/hello-asibeam/",
      "published": "2026-11-08"
    }
  ],
  "contact": "[email protected]"
}

字段

字段类型说明
sitestring站点名
versionstring版本号,跟着发布日期走
statusstringlive 或 locked
updatedstringISO 8601,带时区
surfacesarray四个入口的名称、标题、绝对地址
postsarray文章索引,最新的在前
contactstring联系邮箱

怎么用

fetch('https://www.asibeam.com/api/status.json')
  .then(function (r) { return r.json(); })
  .then(function (d) { console.log(d.version, d.posts.length); });

响应头带 Access-Control-Allow-Origin: *,浏览器里可以直接跨域取。缓存 5 分钟,别指望它秒级更新。

为什么只有这一个

因为目前只需要这一个。没有用户、没有写操作、没有需要隐藏的逻辑,就不该有“用户中心”“鉴权”“RESTful 资源树”。等真的需要的时候再加,加之前先想清楚是给谁用。