Updates Portal API

Updates Portal 提供了小型的公开 JSON API,方便你从自己的系统轮询状态、获取 changelog 条目、查看路线图以及检查已知问题。无需身份验证。该 API 仅提供英文文本;路径中的语言前缀会被忽略。

Base URL

https://updates.foura.ai

服务状态

GET /api/v1/status

返回每个 FourA 服务的实时运行状态,以及进行中和最近的事件。服务端缓存 15 秒,因此高于此频率的轮询将返回相同的数据载荷。

curl https://updates.foura.ai/api/v1/status
{
  "overall": "operational",
  "services": [
    {
      "slug": "api",
      "name": "API",
      "description": "...",
      "status": "operational",
      "daily": [
        { "date": "2026-05-19", "status": "operational", "major_outage_minutes": 0, "partial_outage_minutes": 0, "degraded_minutes": 0, "internal_degraded_minutes": 0 }
      ]
    }
  ],
  "active_incidents": [],
  "recent_incidents": [
    { "id": "...", "service_slug": "api", "service_name": "API", "impact": "minor", "started_at": "...", "resolved_at": "..." }
  ]
}
顶层字段 类型 描述
overall string 若所有服务均正常则为 operational,否则为具体服务状态值之一
services array 每个监控服务对应一个条目,包含 slug、name、description、当前 status 以及 daily 历史(最多 90 天)
active_incidents array 当前未解决的事件
recent_incidents array 过去 14 天内已解决的事件

服务 status 取值:operational、degraded、partial_outage、major_outage、maintenance。

事件 impact 取值:minor(性能下降)、major(部分中断)、critical(服务中断)。

轮询模式

使用此 endpoint 将 FourA 状态接入您自己的仪表板或报警系统。

当无法获取状态数据时,endpoint 会返回 502 和 {"error": "Monitor unreachable"}。请将其视为未知状态而非故障状态,并在下次轮询时重试。

import requests

def check_foura():
    r = requests.get("https://updates.foura.ai/api/v1/status", timeout=5)
    r.raise_for_status()   # raises on the 502 "Monitor unreachable" answer: retry next poll
    data = r.json()
    if data["overall"] != "operational":
        # Page on-call, post to Slack, flip a feature flag, etc.
        for svc in data["services"]:
            if svc["status"] != "operational":
                print(f"{svc['name']}: {svc['status']}")
    return data

旧版 GET /api/status 会返回 410 Gone 并将调用方引导至此处。

更新日志

GET /api/changelog

按时间倒序返回已发布的更新日志条目。

curl "https://updates.foura.ai/api/changelog?limit=20"

Query 参数:

参数 类型 默认值 描述
page integer 1 从 1 开始的页码
limit integer 20 每页条目数(最大 50)
category string - 筛选条件:new、improved 或 fixed
{
  "entries": [
    {
      "id": 42,
      "title": "...",
      "body": "Markdown body",
      "category": "new",
      "tags": "[\"api\",\"dashboard\"]",
      "published": 1,
      "published_at": "2026-05-19T12:00:00Z",
      "created_at": "2026-05-19 11:42:08",
      "updated_at": "2026-05-19 11:44:31"
    }
  ],
  "total": 137,
  "page": 1,
  "limit": 20
}
字段 类型 描述
id integer 条目 ID
title string 条目标题
body string Markdown 正文
category string new、improved 或 fixed
tags string 编码为字符串的 JSON 数组。使用前请先解析: json.loads(entry["tags"])。
published integer 此处始终为 1。该 endpoint 仅返回已发布的条目。
published_at string 带有 Z 后缀的 ISO 8601
created_at string YYYY-MM-DD HH:MM:SS,UTC,无时区标识符
updated_at string 格式与 created_at 相同

这两种时间戳格式是有意区分的: published_at 是编辑日期并包含时区,而 created_at 和 updated_at 是存储时间戳。两者均为 UTC。如果解析器假设三者格式相同,则会在处理另外两个时抛出异常。

RSS

完整的更新日志(最新的 30 条记录)也会以 RSS 形式发布于:

https://updates.foura.ai/rss

可在 Feedly、Miniflux、Thunderbird 或任何阅读器中订阅。Feed 内容与更新日志主体一致,包含渲染为 HTML 的 Markdown。

路线图

GET /api/roadmap

返回所有已发布的路线图项目,按投票数排序,然后按创建时间排序。

curl https://updates.foura.ai/api/roadmap
{
  "items": [
    {
      "id": 12,
      "title": "...",
      "description": "...",
      "status": "planned",
      "category": "developer-experience",
      "votes": 23,
      "target_date": "Q3 2026",
      "completed_at": null,
      "created_at": "2026-03-30 09:32:47"
    }
  ]
}

Item status 的取值包括:planned、in_progress、done、cancelled。updates.foura.ai/roadmap 上的看板渲染三列,因此设为 cancelled 的项会通过此 endpoint 返回给你,但绝不会显示在页面上。

category 是小写 slug,而不是页面上显示的标签。当前使用的 slug 包括:api、infrastructure、developer-experience、dashboard、billing、analytics、authentication。请将该列表视为开放列表,因为新 item 可能会引入新的 slug。

target_date 是自由文本("Q3 2026"),不是日期。在 item 发布之前,completed_at 为 null;发布后则为带 Z 后缀的 ISO 8601(2026-09-01T10:15:30.000Z),与 changelog 条目的 published_at 格式相同。created_at 使用 UTC 的 YYYY-MM-DD HH:MM:SS。同一个对象中存在两种不同的格式,因此请单独解析每个字段。

Voting

POST /api/roadmap/:id/vote

切换单个路线图 item 的投票状态。投票是匿名的,并与调用方的 IP 加上其 User-Agent 的前 50 个字符绑定。再次调用将取消投票。未知或未发布的 item 会返回 404 {"error": "Not found"}。

curl -X POST https://updates.foura.ai/api/roadmap/12/vote
{ "votes": 24, "voted": true }

voted 报告调用后的状态:如果添加了您的投票则为 true,如果移除了投票则为 false。

路线图 endpoint(GET /api/roadmap 及此 endpoint)限制为每个源 IP 每分钟 30 个 request。超过限制将返回 {"error": "Too many votes, slow down"}。

Known Issues

GET /api/issues

返回 FourA 支持团队跟踪的问题。

curl "https://updates.foura.ai/api/issues?tab=open"

查询参数:

参数 类型 默认值 描述
tab string open 活动问题使用 open,已解决/已关闭问题使用 resolved
{
  "issues": [
    {
      "id": 5,
      "title": "...",
      "body": "Markdown description",
      "severity": "medium",
      "status": "investigating",
      "service_id": 3,
      "resolution": "",
      "opened_at": "2026-05-18T09:00:00Z",
      "resolved_at": null,
      "service_name": "API"
    }
  ]
}
字段 类型 说明
id 整数 问题 ID
title 字符串 简要概述
body 字符串 Markdown 描述
severity 字符串 low、medium、high 或 critical
status 字符串 open、investigating、resolved 或 closed
service_id 整数或 null 受影响服务的数字 ID。问题未关联具体服务时为 null。
service_name 字符串或 null 已为您解析的服务显示名称。读取此字段即可,无需自行映射 service_id。
resolution 字符串 修复方式。问题处于未解决状态时为空字符串。
opened_at 字符串 带 Z 后缀的 ISO 8601 格式
resolved_at 字符串或 null 带 Z 后缀的 ISO 8601 格式,未解决时为 null

service_id 是数字外键,并非状态页上看到的 slug。请通过 service_name 将问题与服务进行匹配。

问题 payload 为固定列列表,不包含修改时间戳。如需对问题排序或计算时效,请使用 opened_at 和 resolved_at。在三个公开集合中,仅更新日志条目返回 created_at 和 updated_at。

resolved 选项卡返回最近解决的 30 个问题。open 选项卡返回全部问题。

注意事项

  • 所有 endpoint 均为公开,无需 API key。路线图 endpoint 限制为每个源 IP 每分钟 30 个 request;其他 endpoint 目前没有自身的 rate limit,因此轮询状态的频率建议不要超过其 15 秒缓存所合理支持的范围。
  • response 采用基于 HTTPS 的 JSON 格式。路线图和问题不接受分页参数。唯一的上限是问题中的 ?tab=resolved,返回 30 行。
  • 如需纯文本或原始 HTML 版本的更新日志,请使用 /rss 源,而非 /api/changelog。

相关内容

更新于: 2026年9月10日